diff --git "a/train.jsonl" "b/train.jsonl" --- "a/train.jsonl" +++ "b/train.jsonl" @@ -1,7376 +1,3 @@ -{"id": "spider_train_00000", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "How many heads of the departments are older than 56 ?", "sql": "SELECT COUNT(*) FROM head WHERE age > 56;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00001", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "List the name, born state and age of the heads of departments ordered by age.", "sql": "SELECT name, born_state, age FROM head ORDER BY age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00002", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "List the creation year, name and budget of each department.", "sql": "SELECT creation, name, budget_in_billions FROM department;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00003", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What are the maximum and minimum budget of the departments?", "sql": "SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00004", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What is the average number of employees of the departments whose rank is between 10 and 15?", "sql": "SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00005", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What are the names of the heads who are born outside the California state?", "sql": "SELECT name FROM head WHERE born_state <> 'California';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00006", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?", "sql": "SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00007", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What are the names of the states where at least 3 heads were born?", "sql": "SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00008", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "In which year were most departments established?", "sql": "SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00009", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?", "sql": "SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00010", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "How many acting statuses are there?", "sql": "SELECT COUNT(DISTINCT temporary_acting) FROM management;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00011", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "How many departments are led by heads who are not mentioned?", "sql": "SELECT COUNT(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00012", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "What are the distinct ages of the heads who are acting?", "sql": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00013", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.", "sql": "SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00014", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "Which department has more than 1 head at a time? List the id, name and the number of heads.", "sql": "SELECT T1.department_id, T1.name, COUNT(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00015", "db_id": "department_management", "schema_text": "CREATE TABLE department (Department_ID BIGINT, Name VARCHAR /* e.g. 'Agriculture', 'Commerce' */, Creation BIGINT, Ranking BIGINT, Budget_in_Billions DOUBLE, Num_Employees DOUBLE);\nCREATE TABLE head (head_ID BIGINT, name VARCHAR /* e.g. 'Billy Mayfair', 'Dudley Hart' */, born_state VARCHAR /* e.g. 'California', 'Alabama' */, age DOUBLE);\nCREATE TABLE management (department_ID BIGINT, head_ID BIGINT, temporary_acting VARCHAR /* e.g. 'Yes', 'No' */);", "question": "Which head's name has the substring 'Ha'? List the id and name.", "sql": "SELECT head_id, name FROM head WHERE name ILIKE '%Ha%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00056", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "which course has most number of registered students?", "sql": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id, T1.course_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00057", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is the name of the course with the most registered students?", "sql": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id, T1.course_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00058", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "what is id of students who registered some courses but the least number of courses in these students?", "sql": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00059", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", "sql": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00060", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "what are the first name and last name of all candidates?", "sql": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00061", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the first and last names of all the candidates?", "sql": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00062", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the id of students who never attends courses?", "sql": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00063", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of every student who has never attended a course?", "sql": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00064", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the id of students who attended some courses?", "sql": "SELECT student_id FROM student_course_attendance;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00065", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of all students who have attended at least one course?", "sql": "SELECT student_id FROM student_course_attendance;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00066", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of all students for courses and what are the names of those courses?", "sql": "SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00067", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is detail of the student who most recently registered course?", "sql": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00068", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What details do we have on the students who registered for courses most recently?", "sql": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00069", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "How many students attend course English?", "sql": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00070", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "How many students are attending English courses?", "sql": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00071", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "How many courses do the student whose id is 171 attend?", "sql": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00072", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "How many courses does the student with id 171 actually attend?", "sql": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00073", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find id of the candidate whose email is stanley.monahan@example.org?", "sql": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00074", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is the id of the candidate whose email is stanley.monahan@example.org?", "sql": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00075", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find id of the candidate who most recently accessed the course?", "sql": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00076", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is the id of the candidate who most recently accessed the course?", "sql": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00077", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is detail of the student who registered the most number of courses?", "sql": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T1.student_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00078", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the details of the student who registered for the most number of courses?", "sql": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T1.student_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00079", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the id of students who registered some courses and the number of their registered courses?", "sql": "SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00080", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "For every student who is registered for some course, how many courses are they registered for?", "sql": "SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00081", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "How many registed students do each course have? List course name and the number of their registered students?", "sql": "SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id, T3.course_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00082", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "For each course id, how many students are registered and what are the course names?", "sql": "SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id, T3.course_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00083", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find id of candidates whose assessment code is \"Pass\"?", "sql": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00084", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the candidates that have an outcome code of Pass?", "sql": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00085", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find the cell mobile number of the candidates whose assessment code is \"Fail\"?", "sql": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00086", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", "sql": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00087", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the id of students who registered course 301?", "sql": "SELECT student_id FROM student_course_attendance WHERE course_id = 301;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00088", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who registered for course 301?", "sql": "SELECT student_id FROM student_course_attendance WHERE course_id = 301;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00089", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What is the id of the student who most recently registered course 301?", "sql": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00090", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who registered for course 301 most recently?", "sql": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00091", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find distinct cities of addresses of people?", "sql": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00092", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the different cities where people live?", "sql": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00093", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find distinct cities of address of students?", "sql": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00094", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the different cities where students live?", "sql": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00095", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the names of courses in alphabetical order?", "sql": "SELECT course_name FROM courses ORDER BY course_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00096", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the names of the courses in alphabetical order?", "sql": "SELECT course_name FROM courses ORDER BY course_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00097", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the first names of people in alphabetical order?", "sql": "SELECT first_name FROM people ORDER BY first_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00098", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the first names of the people in alphabetical order?", "sql": "SELECT first_name FROM people ORDER BY first_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00099", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the id of students who registered courses or attended courses?", "sql": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00100", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who either registered or attended a course?", "sql": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00101", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "Find the id of courses which are registered or attended by student whose id is 121?", "sql": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00102", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the courses that are registered or attended by the student whose id is 121?", "sql": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00103", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are all info of students who registered courses but not attended courses?", "sql": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00104", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are all details of the students who registered but did not attend any course?", "sql": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00105", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the id of students who registered course statistics in the order of registration date.", "sql": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00106", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who registered course statistics by order of registration date?", "sql": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00107", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "List the id of students who attended statistics courses in the order of attendance date.", "sql": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00108", "db_id": "student_assessment", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR, line_2 VARCHAR /* e.g. 'Apt. 163', 'Apt. 419' */, city VARCHAR /* e.g. 'Alizeshire', 'Boyleshire' */, zip_postcode VARCHAR /* e.g. '079', '112' */, state_province_county VARCHAR /* e.g. 'Michigan', 'NewMexico' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Candidate_Assessments (candidate_id BIGINT, qualification VARCHAR /* e.g. 'B', 'A' */, assessment_date TIMESTAMP, asessment_outcome_code VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Candidates (candidate_id BIGINT, candidate_details VARCHAR /* e.g. 'Alex', 'Cindy' */);\nCREATE TABLE Courses (course_id BIGINT, course_name VARCHAR /* e.g. 'Art history', 'English' */, course_description VARCHAR /* e.g. 'Art history', 'English' */, other_details VARCHAR);\nCREATE TABLE People (person_id BIGINT, first_name VARCHAR /* e.g. 'Dariana', 'Hoyt' */, middle_name VARCHAR /* e.g. 'Amiya', 'Arielle' */, last_name VARCHAR /* e.g. 'Hartmann', 'Bartoletti' */, cell_mobile_number VARCHAR /* e.g. '(262)347-9364x516', '(508)319-2970x043' */, email_address VARCHAR /* e.g. 'adele.gibson@example.net', 'boyer.lonie@example.com' */, login_name VARCHAR /* e.g. 'bkkv', 'bnto' */, password VARCHAR /* e.g. '5e4ff49a61b3544da3ad7dc7e2cf28847564c64c', '76a93d1d3b7becc932d203beac61d064bd54e947' */);\nCREATE TABLE People_Addresses (person_address_id BIGINT, person_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Student_Course_Attendance (student_id BIGINT, course_id BIGINT, date_of_attendance TIMESTAMP);\nCREATE TABLE Student_Course_Registrations (student_id BIGINT, course_id BIGINT, registration_date TIMESTAMP);\nCREATE TABLE Students (student_id BIGINT, student_details VARCHAR /* e.g. 'Barry', 'Joe' */);", "question": "What are the ids of the students who attended courses in the statistics department in order of attendance date.", "sql": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00213", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "How many books are there?", "sql": "SELECT COUNT(*) FROM book;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00214", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "List the writers of the books in ascending alphabetical order.", "sql": "SELECT Writer FROM book ORDER BY Writer ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00215", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "List the titles of the books in ascending order of issues.", "sql": "SELECT Title FROM book ORDER BY Issues ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00216", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "What are the titles of the books whose writer is not \"Elaine Lee\"?", "sql": "SELECT Title FROM book WHERE Writer <> 'Elaine Lee';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00217", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "What are the title and issues of the books?", "sql": "SELECT Title, Issues FROM book;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00218", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "What are the dates of publications in descending order of price?", "sql": "SELECT Publication_Date FROM publication ORDER BY Price DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00219", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "What are the distinct publishers of publications with price higher than 5000000?", "sql": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00220", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "List the publisher of the publication with the highest price.", "sql": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00222", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show the title and publication dates of books.", "sql": "SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00223", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show writers who have published a book with price more than 4000000.", "sql": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00224", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show the titles of books in descending order of publication price.", "sql": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00225", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show publishers that have more than one publication.", "sql": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00226", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show different publishers together with the number of publications they have.", "sql": "SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00227", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Please show the most common publication date.", "sql": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00228", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "List the writers who have written more than one book.", "sql": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00229", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "List the titles of books that are not published.", "sql": "SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00230", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", "sql": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00231", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "What is the number of distinct publication dates?", "sql": "SELECT COUNT(DISTINCT Publication_Date) FROM publication;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00232", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "How many distinct publication dates are there in our record?", "sql": "SELECT COUNT(DISTINCT Publication_Date) FROM publication;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00233", "db_id": "book_2", "schema_text": "CREATE TABLE book (Book_ID BIGINT, Title VARCHAR /* e.g. 'Bloody Mary', 'Bloody Mary : Lady Liberty' */, Issues DOUBLE, Writer VARCHAR /* e.g. 'Christopher Hinz', 'Garth Ennis' */);\nCREATE TABLE publication (Publication_ID BIGINT, Book_ID BIGINT, Publisher VARCHAR /* e.g. 'Pearson', 'Wiley' */, Publication_Date VARCHAR /* e.g. 'August 2008', 'April 2007' */, Price DOUBLE);", "question": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", "sql": "SELECT Price FROM publication WHERE Publisher = 'Person' OR Publisher = 'Wiley';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00234", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "How many actors are there?", "sql": "SELECT COUNT(*) FROM actor;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00235", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Count the number of actors.", "sql": "SELECT COUNT(*) FROM actor;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00236", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of actors in ascending alphabetical order.", "sql": "SELECT Name FROM actor ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00237", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of actors, ordered alphabetically?", "sql": "SELECT Name FROM actor ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00238", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the characters and duration of actors?", "sql": "SELECT Character, Duration FROM actor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00239", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the characters and durations for each actor.", "sql": "SELECT Character, Duration FROM actor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00240", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of actors whose age is not 20.", "sql": "SELECT Name FROM actor WHERE Age <> 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00241", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of actors who are not 20 years old?", "sql": "SELECT Name FROM actor WHERE Age <> 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00242", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the characters of actors in descending order of age?", "sql": "SELECT Character FROM actor ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00243", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the characters for actors, ordered by age descending.", "sql": "SELECT Character FROM actor ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00244", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What is the duration of the oldest actor?", "sql": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00245", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the duration of the actor with the greatest age.", "sql": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00246", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of musicals with nominee \"Bob Fosse\"?", "sql": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00247", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the names of musicals who have the nominee Bob Fosse.", "sql": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00248", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the distinct nominees of the musicals with the award that is not \"Tony Award\"?", "sql": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00249", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the different nominees of musicals that have an award that is not the Tony Award.", "sql": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00250", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show names of actors and names of musicals they are in.", "sql": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00251", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of actors and the musicals that they are in?", "sql": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00252", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show names of actors that have appeared in musical with name \"The Phantom of the Opera\".", "sql": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00253", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of actors who have been in the musical titled The Phantom of the Opera?", "sql": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00254", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show names of actors in descending order of the year their musical is awarded.", "sql": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00255", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of actors ordered descending by the year in which their musical was awarded?", "sql": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00256", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show names of musicals and the number of actors who have appeared in the musicals.", "sql": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID, T2.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00257", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "How many actors have appeared in each musical?", "sql": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID, T2.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00258", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show names of musicals which have at least three actors.", "sql": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID, T2.Name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00259", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of musicals who have at 3 or more actors?", "sql": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID, T2.Name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00260", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show different nominees and the number of musicals they have been nominated.", "sql": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00261", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "How many musicals has each nominee been nominated for?", "sql": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00262", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Please show the nominee who has been nominated the greatest number of times.", "sql": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00263", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Who is the nominee who has been nominated for the most musicals?", "sql": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00264", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the most common result of the musicals.", "sql": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00265", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Return the most frequent result across all musicals.", "sql": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00266", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the nominees that have been nominated more than two musicals.", "sql": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00267", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Who are the nominees who have been nominated more than two times?", "sql": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00268", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of musicals that do not have actors.", "sql": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00269", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of musicals who have no actors?", "sql": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00270", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\".", "sql": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00271", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?", "sql": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00272", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", "sql": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00273", "db_id": "musical", "schema_text": "CREATE TABLE actor (Actor_ID BIGINT, Name VARCHAR /* e.g. 'Alan Fletcher', 'Ian Smith' */, Musical_ID BIGINT, Character VARCHAR /* e.g. 'Alf Stewart', 'Harold Bishop' */, Duration VARCHAR /* e.g. '1994—', '1985–1992, 1993, 2004—' */, age BIGINT);\nCREATE TABLE musical (Musical_ID BIGINT, Name VARCHAR /* e.g. 'Chicago', 'Les Misérables' */, Year BIGINT, Award VARCHAR /* e.g. 'Tony Award', 'Drama Desk Award' */, Category VARCHAR /* e.g. 'Best Book of a Musical', 'Best Choreography' */, Nominee VARCHAR /* e.g. 'Bob Fosse', 'Cleavant Derricks' */, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?", "sql": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00274", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the emails of the user named \"Mary\".", "sql": "SELECT email FROM user_profiles WHERE name = 'Mary';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00275", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "What is the partition id of the user named \"Iron Man\".", "sql": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00276", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "How many users are there?", "sql": "SELECT COUNT(*) FROM user_profiles;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00277", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "How many followers does each user have?", "sql": "SELECT COUNT(*) FROM follows;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00278", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the number of followers for each user.", "sql": "SELECT COUNT(*) FROM follows GROUP BY f1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00279", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the number of tweets in record.", "sql": "SELECT COUNT(*) FROM tweets;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00280", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the number of users who posted some tweets.", "sql": "SELECT COUNT(DISTINCT UID) FROM tweets;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00281", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name and email of the user whose name contains the word ‘Swift’.", "sql": "SELECT name, email FROM user_profiles WHERE name ILIKE '%Swift%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00282", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the names of users whose emails contain ‘superstar’ or ‘edu’.", "sql": "SELECT name FROM user_profiles WHERE email ILIKE '%superstar%' OR email ILIKE '%edu%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00283", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Return the text of tweets about the topic 'intern'.", "sql": "SELECT text FROM tweets WHERE text ILIKE '%intern%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00284", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name and email of the users who have more than 1000 followers.", "sql": "SELECT name, email FROM user_profiles WHERE followers > 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00285", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".", "sql": "SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1, T1.name HAVING COUNT(*) > (SELECT COUNT(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00286", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name and email for the users who have more than one follower.", "sql": "SELECT T1.name, T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1, T1.name, T1.email HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00287", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the names of users who have more than one tweet.", "sql": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00288", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the id of users who are followed by Mary and Susan.", "sql": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Susan';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00289", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the id of users who are followed by Mary or Susan.", "sql": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' OR T1.name = 'Susan';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00290", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name of the user who has the largest number of followers.", "sql": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00291", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name and email of the user followed by the least number of people.", "sql": "SELECT name, email FROM user_profiles ORDER BY followers LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00292", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.", "sql": "SELECT name, followers FROM user_profiles ORDER BY followers DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00293", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "List the names of 5 users followed by the largest number of other users.", "sql": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00294", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "List the text of all tweets in the order of date.", "sql": "SELECT text FROM tweets ORDER BY createdate;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00295", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name of each user and number of tweets tweeted by each of them.", "sql": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00296", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name and partition id for users who tweeted less than twice.", "sql": "SELECT T1.name, T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid, T1.name, T1.partitionid HAVING COUNT(*) < 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00297", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.", "sql": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00298", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the average number of followers for the users who do not have any tweet.", "sql": "SELECT AVG(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00299", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the average number of followers for the users who had some tweets.", "sql": "SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00300", "db_id": "twitter_1", "schema_text": "CREATE TABLE follows (f1 BIGINT, f2 BIGINT);\nCREATE TABLE tweets (id BIGINT, uid BIGINT, text VARCHAR /* e.g. 'Hello I''m Tony Stark.', 'I love my new boyfriend.' */, createdate TIMESTAMP);\nCREATE TABLE user_profiles (uid BIGINT, name VARCHAR /* e.g. 'Celine Dion', 'Iron Man' */, email VARCHAR /* e.g. 'Mary@yale.edu', 'bw@superhero.com' */, partitionid BIGINT, followers BIGINT);", "question": "Find the maximum and total number of followers of all users.", "sql": "SELECT MAX(followers), SUM(followers) FROM user_profiles;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00301", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the names of all the catalog entries.", "sql": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00302", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are all the catalog entry names?", "sql": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00303", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the list of attribute data types possessed by more than 3 attribute definitions.", "sql": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00304", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the attribute data types with more than 3 attribute definitions?", "sql": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00305", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What is the attribute data type of the attribute with name \"Green\"?", "sql": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00306", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the attribute data type for the attribute named \"Green\".", "sql": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00307", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the name and level of catalog structure with level between 5 and 10.", "sql": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00308", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the name and level of catalog structure with level number between 5 and 10", "sql": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00309", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find all the catalog publishers whose name contains \"Murray\"", "sql": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher ILIKE '%Murray%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00310", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog publishers have substring \"Murray\" in their names?", "sql": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher ILIKE '%Murray%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00313", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.", "sql": "SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00314", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the name and publication date of the catalogs with catalog level number above 5?", "sql": "SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00315", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the entry names of catalog with the attribute possessed by most entries.", "sql": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00316", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the entry names of the catalog with the attribute that have the most entries.", "sql": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00317", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What is the entry name of the most expensive catalog (in USD)?", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00318", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the entry name of the catalog with the highest price (in USD).", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00319", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What is the level name of the cheapest catalog (in USD)?", "sql": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00320", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the level name of the catalog with the lowest price (in USD).", "sql": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00321", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the average and minimum price (in Euro) of all products?", "sql": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00322", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Give me the average and minimum price (in Euro) of the products.", "sql": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00323", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What is the product with the highest height? Give me the catalog entry name.", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00324", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog content has the highest height? Give me the catalog entry name.", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00325", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the name of the product that has the smallest capacity.", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00326", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog content has the smallest capacity? Return the catalog entry name.", "sql": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00327", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the names of all the products whose stock number starts with \"2\".", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number ILIKE '2%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00328", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number ILIKE '2%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00329", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the names of catalog entries with level number 8.", "sql": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00330", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the names of catalog entries with level number 8?", "sql": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00331", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the names of the products with length smaller than 3 or height greater than 5.", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00332", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00333", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the name and attribute ID of the attribute definitions with attribute value 0.", "sql": "SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00334", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.", "sql": "SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00335", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the name and capacity of products with price greater than 700 (in USD).", "sql": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00336", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", "sql": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00337", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the dates on which more than one revisions were made.", "sql": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00338", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "On which days more than one revisions were made on catalogs.", "sql": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00339", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "How many products are there in the records?", "sql": "SELECT COUNT(*) FROM catalog_contents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00340", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Find the total number of catalog contents.", "sql": "SELECT COUNT(*) FROM catalog_contents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00341", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "Name all the products with next entry ID greater than 8.", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00342", "db_id": "product_catalog", "schema_text": "CREATE TABLE Attribute_Definitions (attribute_id BIGINT, attribute_name VARCHAR /* e.g. 'Black', 'Green' */, attribute_data_type VARCHAR /* e.g. 'Bool' */);\nCREATE TABLE Catalog_Contents (catalog_entry_id BIGINT, catalog_level_number BIGINT, parent_entry_id BIGINT, previous_entry_id BIGINT, next_entry_id BIGINT, catalog_entry_name VARCHAR /* e.g. 'Carbonated Water', 'Cola' */, product_stock_number VARCHAR /* e.g. '01 ap', '15 mr' */, price_in_dollars DOUBLE, price_in_euros DOUBLE, price_in_pounds DOUBLE, capacity BIGINT, length BIGINT, height BIGINT, width BIGINT);\nCREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id BIGINT, catalog_level_number BIGINT, attribute_id BIGINT, attribute_value BIGINT);\nCREATE TABLE Catalog_Structure (catalog_level_number BIGINT, catalog_id BIGINT, catalog_level_name VARCHAR /* e.g. 'Category', 'Product' */);\nCREATE TABLE Catalogs (catalog_id BIGINT, catalog_name VARCHAR /* e.g. 'Breakfast Tea', 'Chocolate' */, catalog_publisher VARCHAR /* e.g. 'Grady & Kautzer', 'Murray Coffee shop' */, date_of_publication TIMESTAMP, date_of_latest_revision TIMESTAMP);", "question": "What are the catalog entry names of the products with next entry ID above 8?", "sql": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00439", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many allergies are there?", "sql": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00440", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many allergy entries are there?", "sql": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00441", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many different allergy types exist?", "sql": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00442", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many distinct allergies are there?", "sql": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00443", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergy types.", "sql": "SELECT DISTINCT allergytype FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00444", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the different allergy types?", "sql": "SELECT DISTINCT allergytype FROM Allergy_type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00445", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergies and their types.", "sql": "SELECT allergy, allergytype FROM Allergy_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00446", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the allergies and their types?", "sql": "SELECT allergy, allergytype FROM Allergy_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00447", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergies with type food.", "sql": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00448", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are all the different food allergies?", "sql": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00449", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the type of allergy Cat?", "sql": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00450", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is allergy type of a cat allergy?", "sql": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00451", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many allergies have type animal?", "sql": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00452", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many animal type allergies exist?", "sql": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00453", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergy types and the number of allergies in each type.", "sql": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00454", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the allergy types and how many allergies correspond to each one?", "sql": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00455", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy type has most number of allergies?", "sql": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00456", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy type is most common?", "sql": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00457", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy type has least number of allergies?", "sql": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00458", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy type is the least common?", "sql": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00459", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are there?", "sql": "SELECT COUNT(*) FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00460", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the total number of students?", "sql": "SELECT COUNT(*) FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00461", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show first name and last name for all students.", "sql": "SELECT Fname, Lname FROM Student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00462", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names of all students", "sql": "SELECT Fname, Lname FROM Student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00463", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many different advisors are listed?", "sql": "SELECT COUNT(DISTINCT advisor) FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00464", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many advisors are there?", "sql": "SELECT COUNT(DISTINCT advisor) FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00465", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all majors.", "sql": "SELECT DISTINCT Major FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00466", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the different majors?", "sql": "SELECT DISTINCT Major FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00467", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all cities where students live.", "sql": "SELECT DISTINCT city_code FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00468", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What cities do students live in?", "sql": "SELECT DISTINCT city_code FROM Student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00469", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show first name, last name, age for all female students. Their sex is F.", "sql": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00470", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names and ages for all female students whose sex is F?", "sql": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00471", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show student ids for all male students.", "sql": "SELECT StuID FROM Student WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00472", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the student ids for all male students?", "sql": "SELECT StuID FROM Student WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00473", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are age 18?", "sql": "SELECT COUNT(*) FROM Student WHERE age = 18;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00474", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are 18 years old?", "sql": "SELECT COUNT(*) FROM Student WHERE age = 18;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00475", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all student ids who are older than 20.", "sql": "SELECT StuID FROM Student WHERE age > 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00476", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the student ids for students over 20 years old?", "sql": "SELECT StuID FROM Student WHERE age > 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00477", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which city does the student whose last name is \"Kim\" live in?", "sql": "SELECT city_code FROM Student WHERE LName = 'Kim';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00478", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give the city that the student whose family name is Kim lives in.", "sql": "SELECT city_code FROM Student WHERE LName = 'Kim';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00479", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who is the advisor of student with ID 1004?", "sql": "SELECT Advisor FROM Student WHERE StuID = 1004;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00480", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who advises student 1004?", "sql": "SELECT Advisor FROM Student WHERE StuID = 1004;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00481", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students live in HKG or CHI?", "sql": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00482", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give the number of students living in either HKG or CHI.", "sql": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00483", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the minimum, average, and maximum age of all students.", "sql": "SELECT MIN(age), AVG(age), MAX(age) FROM Student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00484", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the minimum, mean, and maximum age across all students?", "sql": "SELECT MIN(age), AVG(age), MAX(age) FROM Student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00485", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the last name of the youngest student?", "sql": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00486", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Provide the last name of the youngest student.", "sql": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00487", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the student id of the oldest student.", "sql": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00488", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What student id corresponds to the oldest student?", "sql": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00489", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all majors and corresponding number of students.", "sql": "SELECT major, COUNT(*) FROM Student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00490", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are there for each major?", "sql": "SELECT major, COUNT(*) FROM Student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00491", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which major has most number of students?", "sql": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00492", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the largest major?", "sql": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00493", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all ages and corresponding number of students.", "sql": "SELECT age, COUNT(*) FROM Student GROUP BY age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00494", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How old is each student and how many students are each age?", "sql": "SELECT age, COUNT(*) FROM Student GROUP BY age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00495", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the average age for male and female students.", "sql": "SELECT AVG(age), sex FROM Student GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00496", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the average ages for male and female students?", "sql": "SELECT AVG(age), sex FROM Student GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00497", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all cities and corresponding number of students.", "sql": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00498", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students live in each city?", "sql": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00499", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all advisors and corresponding number of students.", "sql": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00500", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students does each advisor have?", "sql": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00501", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which advisor has most number of students?", "sql": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00502", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give the advisor with the most students.", "sql": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00503", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students have cat allergies?", "sql": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00504", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are affected by cat allergies?", "sql": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00505", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all student IDs who have at least two allergies.", "sql": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00506", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the students ids of students who have more than one allergy?", "sql": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00507", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the student ids of students who don't have any allergies?", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00508", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which students are unaffected by allergies?", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00509", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many female students have milk or egg allergies?", "sql": "SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00510", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students who are female are allergic to milk or eggs?", "sql": "SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00511", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students have a food allergy?", "sql": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00512", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are affected by food related allergies?", "sql": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00513", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy has most number of students affected?", "sql": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00514", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which allergy is the most common?", "sql": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00515", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergies with number of students affected.", "sql": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00516", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students have each different allergy?", "sql": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00517", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all allergy type with number of students affected.", "sql": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00518", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are affected by each allergy type?", "sql": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00519", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the last name and age of the student who has allergy to both milk and cat.", "sql": "SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00520", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the last names and ages of the students who are allergic to milk and cat?", "sql": "SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00521", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.", "sql": "SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00522", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.", "sql": "SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00523", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name and gender of the student who has allergy to milk but not cat.", "sql": "SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00524", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name and gender of the students who have allergy to milk but can put up with cats?", "sql": "SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00525", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of the students who have allergies with food and animal types.", "sql": "SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00526", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How old are the students with allergies to food and animal types on average?", "sql": "SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00527", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List the first and last name of the students who do not have any food type allergy.", "sql": "SELECT fname, lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00528", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the full name of each student who is not allergic to any type of food.", "sql": "SELECT fname, lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00529", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of male (sex is 'M') students who have some food type allery.", "sql": "SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00530", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many male students (sex is 'M') are allergic to any type of food?", "sql": "SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00531", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the different first names and cities of the students who have allergy to milk or cat.", "sql": "SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00532", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "sql": "SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00533", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "sql": "SELECT COUNT(*) FROM Student WHERE age > 18 AND StuID NOT IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00534", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are over 18 and do not have allergy to food type or animal type?", "sql": "SELECT COUNT(*) FROM Student WHERE age > 18 AND StuID NOT IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00535", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name and major of the students who are not allegry to soy.", "sql": "SELECT fname, major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00536", "db_id": "allergy_1", "schema_text": "CREATE TABLE Allergy_Type (Allergy VARCHAR /* e.g. 'Anchovies', 'Bee Stings' */, AllergyType VARCHAR /* e.g. 'food', 'animal' */);\nCREATE TABLE Has_Allergy (StuID BIGINT, Allergy VARCHAR /* e.g. 'Tree Pollen', 'Nuts' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name and major of the students who are able to consume soy?", "sql": "SELECT fname, major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00537", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "A list of the top 5 countries by number of invoices. List country name and number of invoices.", "sql": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00538", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the top 5 countries by number of invoices and how many do they have?", "sql": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00539", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.", "sql": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00540", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of the top 8 countries by total invoice size and what are those sizes?", "sql": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00541", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "A list of the top 10 countries by average invoice size. List country name and average invoice size.", "sql": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00543", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find out 5 customers who most recently purchased something. List customers' first and last name.", "sql": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00544", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the first and last names of the 5 customers who purchased something most recently?", "sql": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00549", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the top 5 genres by number of tracks. List genres name and total tracks.", "sql": "SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00550", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many tracks does each genre have and what are the names of the top 5?", "sql": "SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00551", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List every album's title.", "sql": "SELECT title FROM albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00552", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the titles of all the albums?", "sql": "SELECT title FROM albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00553", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List every album ordered by album title in ascending order.", "sql": "SELECT title FROM albums ORDER BY title;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00554", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the titles of all the albums alphabetically ascending?", "sql": "SELECT title FROM albums ORDER BY title;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00555", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List every album whose title starts with A in alphabetical order.", "sql": "SELECT title FROM albums WHERE title ILIKE 'A%' ORDER BY title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00556", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the titles of all albums that start with A in alphabetical order?", "sql": "SELECT title FROM albums WHERE title ILIKE 'A%' ORDER BY title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00559", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List total amount of invoice from Chicago, IL.", "sql": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00560", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the total amount of money in the invoices billed from Chicago, Illinois?", "sql": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00561", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the number of invoices from Chicago, IL.", "sql": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00562", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many invoices were billed from Chicago, IL?", "sql": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00563", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the number of invoices from the US, grouped by state.", "sql": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00564", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many invoices were billed from each state?", "sql": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00565", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the state in the US with the most invoices.", "sql": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00566", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the states with the most invoices?", "sql": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00569", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List Aerosmith's albums.", "sql": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00570", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the titles of all the Aerosmith albums?", "sql": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00571", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many albums does Billy Cobham has?", "sql": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00572", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many albums has Billy Cobam released?", "sql": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00573", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Eduardo Martins is a customer at which company?", "sql": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00574", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the company where Eduardo Martins is a customer?", "sql": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00575", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is Astrid Gruber's email and phone number?", "sql": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00576", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the email and phone number of Astrid Gruber the customer?", "sql": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00577", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many customers live in Prague city?", "sql": "SELECT COUNT(*) FROM customers WHERE city = 'Prague';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00578", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many customers live in the city of Prague?", "sql": "SELECT COUNT(*) FROM customers WHERE city = 'Prague';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00579", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many customers in state of CA?", "sql": "SELECT COUNT(*) FROM customers WHERE state = 'CA';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00580", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many customers are from California?", "sql": "SELECT COUNT(*) FROM customers WHERE state = 'CA';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00581", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What country does Roberto Almeida live?", "sql": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00582", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "In which country does Roberto Almeida?", "sql": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00583", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of albums that are released by aritist whose name has 'Led'", "sql": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name ILIKE '%Led%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00584", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?", "sql": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name ILIKE '%Led%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00585", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many customers does Steve Johnson support?", "sql": "SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00586", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the count of customers that Steve Johnson supports?", "sql": "SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00587", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the title, phone and hire date of Nancy Edwards?", "sql": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00588", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the title, phone number and hire date for the employee named Nancy Edwards?", "sql": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00589", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "find the full name of employees who report to Nancy Edwards?", "sql": "SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00590", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the first and last name of the employee who reports to Nancy Edwards?", "sql": "SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00591", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the address of employee Nancy Edwards?", "sql": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00592", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is Nancy Edwards's address?", "sql": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00593", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find the full name of employee who supported the most number of customers.", "sql": "SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id, T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00594", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the full name of the employee who has the most customers?", "sql": "SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id, T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00595", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many employees are living in Canada?", "sql": "SELECT COUNT(*) FROM employees WHERE country = 'Canada';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00596", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many employees live in Canada?", "sql": "SELECT COUNT(*) FROM employees WHERE country = 'Canada';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00597", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is employee Nancy Edwards's phone number?", "sql": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00598", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the the phone number of Nancy Edwards?", "sql": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00599", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Who is the youngest employee in the company? List employee's first and last name.", "sql": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00600", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What si the youngest employee's first and last name?", "sql": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00601", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List top 10 employee work longest in the company. List employee's first and last name.", "sql": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC LIMIT 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00602", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the first and last names of the top 10 longest-serving employees?", "sql": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC LIMIT 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00603", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find the number of employees whose title is IT Staff from each city?", "sql": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00604", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many employees who are IT staff are from each city?", "sql": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00605", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "sql": "SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to, T2.first_name, T2.last_name ORDER BY COUNT(T1.reports_to) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00606", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the first and last names of all the employees and how many people report to them?", "sql": "SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to, T2.first_name, T2.last_name ORDER BY COUNT(T1.reports_to) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00607", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many orders does Lucas Mancini has?", "sql": "SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00608", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many orders does Luca Mancini have in his invoices?", "sql": "SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00609", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the total amount of money spent by Lucas Mancini?", "sql": "SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00610", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How much money did Lucas Mancini spend?", "sql": "SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00611", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List all media types.", "sql": "SELECT name FROM media_types;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00612", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all the media types?", "sql": "SELECT name FROM media_types;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00613", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List all different genre types.", "sql": "SELECT DISTINCT name FROM genres;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00614", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the different names of the genres?", "sql": "SELECT DISTINCT name FROM genres;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00615", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of all playlist.", "sql": "SELECT name FROM playlists;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00616", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all the playlists?", "sql": "SELECT name FROM playlists;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00617", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Who is the composer of track Fast As a Shark?", "sql": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00618", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the composer who created the track \"Fast As a Shark\"?", "sql": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00619", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How long does track Fast As a Shark has?", "sql": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00620", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many milliseconds long is Fast As a Shark?", "sql": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00621", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the name of tracks whose genre is Rock?", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00622", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the name of all tracks in the Rock genre?", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00623", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is title of album which track Balls to the Wall belongs to?", "sql": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00624", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the name of the album that has the track Ball to the Wall?", "sql": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00625", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List name of all tracks in Balls to the Wall.", "sql": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00626", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the name of all tracks in the album named Balls to the Wall?", "sql": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00627", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List title of albums have the number of tracks greater than 10.", "sql": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id, T1.title HAVING COUNT(T1.id) > 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00628", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of the albums that have more than 10 tracks?", "sql": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id, T1.title HAVING COUNT(T1.id) > 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00629", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00630", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all Rock tracks that are stored on MPEG audio files?", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00631", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00632", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00633", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of tracks belongs to genre Rock or genre Jazz.", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00634", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of the tracks that are Rock or Jazz songs?", "sql": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00635", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of all tracks in the playlists of Movies.", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00636", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all tracks that are on playlists titled Movies?", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00637", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List the name of playlist which has number of tracks greater than 100.", "sql": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id, T2.name HAVING COUNT(T1.track_id) > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00638", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all playlists that have more than 100 tracks?", "sql": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id, T2.name HAVING COUNT(T1.track_id) > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00639", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "List all tracks bought by customer Daan Peeters.", "sql": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00640", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the tracks that Dean Peeters bought?", "sql": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00641", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How much is the track Fast As a Shark?", "sql": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00642", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What is the unit price of the tune \"Fast As a Shark\"?", "sql": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00643", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find the name of tracks which are in Movies playlist but not in music playlist.", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00644", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00645", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find the name of tracks which are in both Movies and music playlists.", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00646", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "What are the names of all the tracks that are in both the Movies and music playlists?", "sql": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00647", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "Find number of tracks in each genre?", "sql": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00648", "db_id": "store_1", "schema_text": "CREATE TABLE albums (id BIGINT, title VARCHAR, artist_id BIGINT);\nCREATE TABLE artists (id BIGINT, name VARCHAR);\nCREATE TABLE customers (id BIGINT, first_name VARCHAR, last_name VARCHAR, company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, address VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, postal_code VARCHAR, phone VARCHAR, fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, email VARCHAR, support_rep_id BIGINT);\nCREATE TABLE employees (id BIGINT, last_name VARCHAR /* e.g. 'Adams', 'Callahan' */, first_name VARCHAR /* e.g. 'Andrew', 'Jane' */, title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, reports_to BIGINT, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, city VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, state VARCHAR /* e.g. 'AB' */, country VARCHAR /* e.g. 'Canada' */, postal_code VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE genres (id BIGINT, name VARCHAR);\nCREATE TABLE invoice_lines (id BIGINT, invoice_id BIGINT, track_id BIGINT, unit_price DOUBLE, quantity BIGINT);\nCREATE TABLE invoices (id BIGINT, customer_id BIGINT, invoice_date TIMESTAMP, billing_address VARCHAR, billing_city VARCHAR, billing_state VARCHAR, billing_country VARCHAR, billing_postal_code VARCHAR, total DOUBLE);\nCREATE TABLE media_types (id BIGINT, name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE playlist_tracks (playlist_id BIGINT, track_id BIGINT);\nCREATE TABLE playlists (id BIGINT, name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE tracks (id BIGINT, name VARCHAR, album_id BIGINT, media_type_id BIGINT, genre_id BIGINT, composer VARCHAR, milliseconds BIGINT, bytes BIGINT, unit_price DOUBLE);", "question": "How many tracks are in each genre?", "sql": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00649", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "How many editors are there?", "sql": "SELECT COUNT(*) FROM editor;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00650", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "List the names of editors in ascending order of age.", "sql": "SELECT Name FROM editor ORDER BY Age ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00651", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "What are the names and ages of editors?", "sql": "SELECT Name, Age FROM editor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00652", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "List the names of editors who are older than 25.", "sql": "SELECT Name FROM editor WHERE Age > 25;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00653", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the names of editors of age either 24 or 25.", "sql": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00654", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "What is the name of the youngest editor?", "sql": "SELECT Name FROM editor ORDER BY Age ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00655", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "What are the different ages of editors? Show each age along with the number of editors of that age.", "sql": "SELECT Age, COUNT(*) FROM editor GROUP BY Age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00657", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the distinct themes of journals.", "sql": "SELECT DISTINCT Theme FROM journal;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00658", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the names of editors and the theme of journals for which they serve on committees.", "sql": "SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00659", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "For each journal_committee, find the editor name and the journal theme.", "sql": "SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00660", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.", "sql": "SELECT T2.Name, T2.age, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00661", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", "sql": "SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00662", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the id, name of each editor and the number of journal committees they are on.", "sql": "SELECT T1.editor_id, T1.Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id, T1.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00663", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "Show the names of editors that are on at least two journal committees.", "sql": "SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00664", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "List the names of editors that are not on any journal committee.", "sql": "SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00665", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.", "sql": "SELECT date, theme, sales FROM journal EXCEPT SELECT T1.date, T1.theme, T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00666", "db_id": "journal_committee", "schema_text": "CREATE TABLE editor (Editor_ID BIGINT, Name VARCHAR /* e.g. 'Anna Powierza', 'Grażyna Wolszczak' */, Age DOUBLE);\nCREATE TABLE journal (Journal_ID BIGINT, Date VARCHAR /* e.g. 'December 16, 2001', 'December 2, 2001' */, Theme VARCHAR /* e.g. 'Baltimore Ravens', 'Cincinnati Bengals' */, Sales BIGINT);\nCREATE TABLE journal_committee (Editor_ID BIGINT, Journal_ID BIGINT, Work_Type VARCHAR /* e.g. 'Photo', 'Article' */);", "question": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", "sql": "SELECT AVG(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00667", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many accounts do we have?", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00668", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of accounts.", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00669", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show ids, customer ids, names for all accounts.", "sql": "SELECT account_id, customer_id, account_name FROM Accounts;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00670", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the account ids, customer ids, and account names for all the accounts?", "sql": "SELECT account_id, customer_id, account_name FROM Accounts;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00671", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show other account details for account with name 338.", "sql": "SELECT other_account_details FROM Accounts WHERE account_name = '338';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00672", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the other account details for the account with the name 338?", "sql": "SELECT other_account_details FROM Accounts WHERE account_name = '338';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00673", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the first name, last name, and phone of the customer with account name 162?", "sql": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00674", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Give the full name and phone of the customer who has the account name 162.", "sql": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00675", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many accounts does the customer with first name Art and last name Turcotte have?", "sql": "SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00676", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.", "sql": "SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00677", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all customer ids and the number of accounts for each customer.", "sql": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00678", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many accounts are there for each customer id?", "sql": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00679", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the customer id and number of accounts with most accounts.", "sql": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00680", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?", "sql": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00682", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Give the full name and customer id of the customer with the fewest accounts.", "sql": "SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.customer_first_name, T2.customer_last_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00683", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the number of all customers without an account.", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00684", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many customers do not have an account?", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00685", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the first names and last names of customers without any account.", "sql": "SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00686", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the full names of customers who do not have any accounts?", "sql": "SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00687", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show distinct first and last names for all customers with an account.", "sql": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00688", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the full names of customers who have accounts?", "sql": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00689", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many customers have an account?", "sql": "SELECT COUNT(DISTINCT customer_id) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00690", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of customers who hold an account.", "sql": "SELECT COUNT(DISTINCT customer_id) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00691", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many customers do we have?", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00692", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of customers.", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00693", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show ids, first names, last names, and phones for all customers.", "sql": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00694", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the ids, full names, and phones of each customer?", "sql": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00695", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the phone and email for customer with first name Aniyah and last name Feest?", "sql": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00696", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the phone and email of the customer with the first name Aniyah and last name Feest.", "sql": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00697", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the number of customer cards.", "sql": "SELECT COUNT(*) FROM Customers_cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00698", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many customer cards are there?", "sql": "SELECT COUNT(*) FROM Customers_cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00699", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show ids, customer ids, card type codes, card numbers for all cards.", "sql": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00700", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are card ids, customer ids, card types, and card numbers for each customer card?", "sql": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00701", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", "sql": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00702", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the valid from and valid to dates for the card with the number 4560596484842?", "sql": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00703", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the first name, last name, and phone of the customer with card 4560596484842.", "sql": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00704", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the full name and phone of the customer who has card number 4560596484842.", "sql": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00705", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many cards does customer Art Turcotte have?", "sql": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00706", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of cards the customer with the first name Art and last name Turcotte has.", "sql": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00707", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many debit cards do we have?", "sql": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00708", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of customer cards of the type Debit.", "sql": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00709", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many credit cards does customer Blanche Huels have?", "sql": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00710", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.", "sql": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00711", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all customer ids and the number of cards owned by each customer.", "sql": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00712", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different customer ids, and how many cards does each one hold?", "sql": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00715", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show id, first and last names for all customers with at least two cards.", "sql": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.customer_first_name, T2.customer_last_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00716", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the ids and full names of customers who hold two or more cards?", "sql": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.customer_first_name, T2.customer_last_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00719", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all card type codes and the number of cards in each type.", "sql": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00720", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different card types, and how many cards are there of each?", "sql": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00721", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the card type code with most number of cards?", "sql": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00722", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the code of the card type that is most common.", "sql": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00723", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show card type codes with at least 5 cards.", "sql": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00724", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the codes of card types that have 5 or more cards?", "sql": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00725", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all card type codes and the number of customers holding cards in each type.", "sql": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00726", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different card type codes, and how many different customers hold each type?", "sql": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00727", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the customer ids and firstname without a credit card.", "sql": "SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00728", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the ids and first names of customers who do not hold a credit card?", "sql": "SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00729", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all card type codes.", "sql": "SELECT DISTINCT card_type_code FROM Customers_Cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00730", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different card type codes?", "sql": "SELECT DISTINCT card_type_code FROM Customers_Cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00731", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the number of card types.", "sql": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00732", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many different card types are there?", "sql": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00733", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show all transaction types.", "sql": "SELECT DISTINCT transaction_type FROM Financial_Transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00734", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different types of transactions?", "sql": "SELECT DISTINCT transaction_type FROM Financial_Transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00735", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the number of transaction types.", "sql": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00736", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "How many different types of transactions are there?", "sql": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00737", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the average and total transaction amount?", "sql": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00738", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the average transaction amount, as well as the total amount of all transactions.", "sql": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00739", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the card type codes and the number of transactions.", "sql": "SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00740", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different card types, and how many transactions have been made with each?", "sql": "SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00741", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the transaction type and the number of transactions.", "sql": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00742", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different transaction types, and how many transactions of each have taken place?", "sql": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00743", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What is the transaction type that has processed the greatest total amount in transactions?", "sql": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00744", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Return the type of transaction with the highest total amount.", "sql": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00745", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "Show the account id and the number of transactions for each account", "sql": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00746", "db_id": "customers_card_transactions", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, account_name VARCHAR /* e.g. '022', '038' */, other_account_details VARCHAR /* e.g. 'VIP', 'Regular' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Aniyah', 'Armani' */, customer_last_name VARCHAR /* e.g. 'Effertz', 'Brekke' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(415)237-0701x3115', '(673)872-5338' */, customer_email VARCHAR /* e.g. 'ahomenick@example.org', 'dauer@example.net' */, other_customer_details VARCHAR);\nCREATE TABLE Customers_Cards (card_id BIGINT, customer_id BIGINT, card_type_code VARCHAR /* e.g. 'Debit', 'Credit' */, card_number BIGINT, date_valid_from TIMESTAMP, date_valid_to TIMESTAMP, other_card_details BIGINT);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, previous_transaction_id BIGINT, account_id BIGINT, card_id BIGINT, transaction_type VARCHAR /* e.g. 'Refund', 'Payment' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);", "question": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?", "sql": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00747", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "How many tracks do we have?", "sql": "SELECT COUNT(*) FROM track;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00748", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Count the number of tracks.", "sql": "SELECT COUNT(*) FROM track;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00749", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name and location for all tracks.", "sql": "SELECT name, LOCATION FROM track;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00750", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names and locations of all tracks?", "sql": "SELECT name, LOCATION FROM track;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00751", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show names and seatings, ordered by seating for all tracks opened after 2000.", "sql": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00752", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names and seatings for all tracks opened after 2000, ordered by seating?", "sql": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00753", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What is the name, location and seating for the most recently opened track?", "sql": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00754", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Return the name, location, and seating of the track that was opened in the most recent year.", "sql": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00755", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What is the minimum, maximum, and average seating for all tracks.", "sql": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00756", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Return the minimum, maximum, and average seating across all tracks.", "sql": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00757", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name, location, open year for all tracks with a seating higher than the average.", "sql": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00758", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names, locations, and years of opening for tracks with seating higher than average?", "sql": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00759", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are distinct locations where tracks are located?", "sql": "SELECT DISTINCT LOCATION FROM track;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00760", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Give the different locations of tracks.", "sql": "SELECT DISTINCT LOCATION FROM track;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00761", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "How many races are there?", "sql": "SELECT COUNT(*) FROM race;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00762", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Count the number of races.", "sql": "SELECT COUNT(*) FROM race;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00763", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the distinct classes that races can have?", "sql": "SELECT DISTINCT CLASS FROM race;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00764", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Return the different classes of races.", "sql": "SELECT DISTINCT CLASS FROM race;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00765", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show name, class, and date for all races.", "sql": "SELECT name, CLASS, date FROM race;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00766", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names, classes, and dates for all races?", "sql": "SELECT name, CLASS, date FROM race;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00767", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the race class and number of races in each class.", "sql": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00768", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the different classes of races, and how many races correspond to each?", "sql": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00769", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What is the race class with most number of races.", "sql": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00770", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Give the class of races that is most common.", "sql": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00771", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "List the race class with at least two races.", "sql": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00772", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the classes of races that have two or more corresponding races?", "sql": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00773", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names for tracks without a race in class 'GT'.", "sql": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00774", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Give the names of tracks that do not have a race in the class 'GT'.", "sql": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00775", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show all track names that have had no races.", "sql": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00776", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Return the names of tracks that have no had any races.", "sql": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00777", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.", "sql": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00778", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the years of opening for tracks with seating between 4000 and 5000?", "sql": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00779", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name of track and the number of races in each track.", "sql": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00780", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names of different tracks, and how many races has each had?", "sql": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00781", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name of track with most number of races.", "sql": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00782", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What is the name of the track that has had the greatest number of races?", "sql": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00783", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name and date for each race and its track name.", "sql": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00784", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names and dates of races, and the names of the tracks where they are held?", "sql": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00785", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Show the name and location of track with 1 race.", "sql": "SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name, T2.location HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00786", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the names and locations of tracks that have had exactly 1 race?", "sql": "SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id, T2.name, T2.location HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00787", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.", "sql": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00788", "db_id": "race_track", "schema_text": "CREATE TABLE race (Race_ID BIGINT, Name VARCHAR /* e.g. 'Bosch Engineering 250 at VIR', 'Gainsco Grand Prix of Miami' */, Class VARCHAR /* e.g. 'DP/GT', 'GT' */, Date VARCHAR /* e.g. 'April 19', 'April 27' */, Track_ID BIGINT);\nCREATE TABLE track (Track_ID BIGINT, Name VARCHAR /* e.g. 'Auto Club Speedway', 'Chicagoland Speedway' */, Location VARCHAR /* e.g. 'Avondale, AZ', 'Brooklyn, MI' */, Seating DOUBLE, Year_Opened DOUBLE);", "question": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?", "sql": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00807", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many albums are there?", "sql": "SELECT COUNT(*) FROM ALBUM;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00808", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the number of albums.", "sql": "SELECT COUNT(*) FROM ALBUM;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00809", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "List the names of all music genres.", "sql": "SELECT Name FROM GENRE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00810", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names of different music genres?", "sql": "SELECT Name FROM GENRE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00811", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find all the customer information in state NY.", "sql": "SELECT * FROM CUSTOMER WHERE State = 'NY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00812", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is all the customer information for customers in NY state?", "sql": "SELECT * FROM CUSTOMER WHERE State = 'NY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00813", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the first names and last names of the employees who live in Calgary city.", "sql": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00814", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the full names of employees living in the city of Calgary.", "sql": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00815", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the distinct billing countries of the invoices?", "sql": "SELECT DISTINCT (BillingCountry) FROM INVOICE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00816", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the different billing countries for all invoices.", "sql": "SELECT DISTINCT (BillingCountry) FROM INVOICE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00817", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the names of all artists that have \"a\" in their names.", "sql": "SELECT Name FROM ARTIST WHERE Name ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00818", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names of artist who have the letter 'a' in their names?", "sql": "SELECT Name FROM ARTIST WHERE Name ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00819", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the title of all the albums of the artist \"AC/DC\".", "sql": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00820", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the titles of albums by the artist \"AC/DC\"?", "sql": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00821", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Hom many albums does the artist \"Metallica\" have?", "sql": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00822", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the number of albums by the artist \"Metallica\".", "sql": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00823", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Which artist does the album \"Balls to the Wall\" belong to?", "sql": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00824", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the name of the artist who made the album \"Balls to the Wall\".", "sql": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00825", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Which artist has the most albums?", "sql": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00826", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the name of the artist with the greatest number of albums?", "sql": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00827", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the names of all the tracks that contain the word \"you\".", "sql": "SELECT Name FROM TRACK WHERE Name ILIKE '%you%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00828", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names of tracks that contain the the word you in them?", "sql": "SELECT Name FROM TRACK WHERE Name ILIKE '%you%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00829", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the average unit price of all the tracks?", "sql": "SELECT AVG(UnitPrice) FROM TRACK;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00830", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the average unit price for a track.", "sql": "SELECT AVG(UnitPrice) FROM TRACK;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00831", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the durations of the longest and the shortest tracks in milliseconds?", "sql": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00832", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the maximum and minimum durations of tracks in milliseconds.", "sql": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00833", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Show the album names, ids and the number of tracks for each album.", "sql": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID, T1.Title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00834", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names and ids of the different albums, and how many tracks are on each?", "sql": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID, T1.Title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00835", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the name of the most common genre in all tracks?", "sql": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId, T1.Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00836", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the name of the genre that is most frequent across all tracks.", "sql": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId, T1.Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00837", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the least common media type in all tracks?", "sql": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId, T1.Name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00838", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the name of the media type that is least common across all tracks?", "sql": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId, T1.Name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00839", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.", "sql": "SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID, T1.Title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00840", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "sql": "SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID, T1.Title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00841", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many tracks belong to rock genre?", "sql": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00842", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Count the number of tracks that are part of the rock genre.", "sql": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00843", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the average unit price of tracks that belong to Jazz genre?", "sql": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00844", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the average unit price of jazz tracks.", "sql": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00845", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"?", "sql": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00846", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", "sql": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00847", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many customers have email that contains \"gmail.com\"?", "sql": "SELECT COUNT(*) FROM CUSTOMER WHERE Email ILIKE '%gmail.com%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00848", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Count the number of customers that have an email containing \"gmail.com\".", "sql": "SELECT COUNT(*) FROM CUSTOMER WHERE Email ILIKE '%gmail.com%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00849", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the first name and last name employee helps the customer with first name Leonie?", "sql": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00850", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the full names of employees who help customers with the first name Leonie.", "sql": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00851", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What city does the employee who helps the customer with postal code 70174 live in?", "sql": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00852", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the cities corresponding to employees who help customers with the postal code 70174.", "sql": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00853", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many distinct cities does the employees live in?", "sql": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00854", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the number of different cities that employees live in.", "sql": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00855", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.", "sql": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00856", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", "sql": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00857", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find all the customer last names that do not have invoice totals larger than 20.", "sql": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00858", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the last names of customers without invoice totals exceeding 20?", "sql": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00859", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the first names of all customers that live in Brazil and have an invoice.", "sql": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00860", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the different first names for customers from Brazil who have also had an invoice?", "sql": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00861", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the address of all customers that live in Germany and have invoice.", "sql": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00862", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the addresses of customers living in Germany who have had an invoice?", "sql": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00863", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "List the phone numbers of all employees.", "sql": "SELECT Phone FROM EMPLOYEE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00864", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the phone numbers for each employee?", "sql": "SELECT Phone FROM EMPLOYEE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00865", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many tracks are in the AAC audio file media type?", "sql": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00866", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Count the number of tracks that are of the media type \"AAC audio file\".", "sql": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00867", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?", "sql": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00868", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the average millisecond length of Latin and Pop tracks.", "sql": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00873", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Please list all album titles in alphabetical order.", "sql": "SELECT Title FROM ALBUM ORDER BY Title;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00874", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are all the album titles, in alphabetical order?", "sql": "SELECT Title FROM ALBUM ORDER BY Title;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00875", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", "sql": "SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId, T2.Name HAVING COUNT(*) >= 3 ORDER BY T2.Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00876", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?", "sql": "SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId, T2.Name HAVING COUNT(*) >= 3 ORDER BY T2.Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00877", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the names of artists that do not have any albums.", "sql": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00878", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the names of artists who have not released any albums?", "sql": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00879", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What is the average unit price of rock tracks?", "sql": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00880", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the average unit price of tracks from the Rock genre.", "sql": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00881", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the duration of the longest and shortest pop tracks in milliseconds?", "sql": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00882", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the maximum and minimum millisecond lengths of pop tracks.", "sql": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00883", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the birth dates of employees living in Edmonton?", "sql": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00884", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the birth dates corresponding to employees who live in the city of Edmonton.", "sql": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00885", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the distinct unit prices of all tracks?", "sql": "SELECT DISTINCT (UnitPrice) FROM TRACK;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00886", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the distinct unit prices for tracks.", "sql": "SELECT DISTINCT (UnitPrice) FROM TRACK;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00887", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "How many artists do not have any album?", "sql": "SELECT COUNT(*) FROM ARTIST WHERE artistid NOT IN (SELECT artistid FROM ALBUM);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00888", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Cound the number of artists who have not released an album.", "sql": "SELECT COUNT(*) FROM ARTIST WHERE artistid NOT IN (SELECT artistid FROM ALBUM);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00889", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?", "sql": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00890", "db_id": "chinook_1", "schema_text": "CREATE TABLE Album (AlbumId BIGINT, Title VARCHAR, ArtistId BIGINT);\nCREATE TABLE Artist (ArtistId BIGINT, Name VARCHAR);\nCREATE TABLE Customer (CustomerId BIGINT, FirstName VARCHAR, LastName VARCHAR, Company VARCHAR /* e.g. 'Apple Inc.', 'Banco do Brasil S.A.' */, Address VARCHAR, City VARCHAR, State VARCHAR, Country VARCHAR, PostalCode VARCHAR, Phone VARCHAR, Fax VARCHAR /* e.g. '+1 (212) 221-4679', '+1 (408) 996-1011' */, Email VARCHAR, SupportRepId BIGINT);\nCREATE TABLE Employee (EmployeeId BIGINT, LastName VARCHAR /* e.g. 'Adams', 'Callahan' */, FirstName VARCHAR /* e.g. 'Andrew', 'Jane' */, Title VARCHAR /* e.g. 'Sales Support Agent', 'IT Staff' */, ReportsTo BIGINT, BirthDate TIMESTAMP, HireDate TIMESTAMP, Address VARCHAR /* e.g. '1111 6 Ave SW', '11120 Jasper Ave NW' */, City VARCHAR /* e.g. 'Calgary', 'Lethbridge' */, State VARCHAR /* e.g. 'AB' */, Country VARCHAR /* e.g. 'Canada' */, PostalCode VARCHAR /* e.g. 'T1H 1Y8', 'T1K 5N8' */, Phone VARCHAR /* e.g. '+1 (403) 262-3443', '+1 (403) 246-9887' */, Fax VARCHAR /* e.g. '+1 (403) 246-9899', '+1 (403) 262-3322' */, Email VARCHAR /* e.g. 'andrew@chinookcorp.com', 'jane@chinookcorp.com' */);\nCREATE TABLE Genre (GenreId BIGINT, Name VARCHAR);\nCREATE TABLE Invoice (InvoiceId BIGINT, CustomerId BIGINT, InvoiceDate TIMESTAMP, BillingAddress VARCHAR, BillingCity VARCHAR, BillingState VARCHAR, BillingCountry VARCHAR, BillingPostalCode VARCHAR, Total DOUBLE);\nCREATE TABLE InvoiceLine (InvoiceLineId BIGINT, InvoiceId BIGINT, TrackId BIGINT, UnitPrice DOUBLE, Quantity BIGINT);\nCREATE TABLE MediaType (MediaTypeId BIGINT, Name VARCHAR /* e.g. 'AAC audio file', 'MPEG audio file' */);\nCREATE TABLE Playlist (PlaylistId BIGINT, Name VARCHAR /* e.g. 'Audiobooks', 'Movies' */);\nCREATE TABLE PlaylistTrack (PlaylistId BIGINT, TrackId BIGINT);\nCREATE TABLE Track (TrackId BIGINT, Name VARCHAR, AlbumId BIGINT, MediaTypeId BIGINT, GenreId BIGINT, Composer VARCHAR, Milliseconds BIGINT, Bytes BIGINT, UnitPrice DOUBLE);", "question": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.", "sql": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00891", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find all the phone numbers.", "sql": "SELECT customer_phone FROM available_policies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00892", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are all the phone numbers?", "sql": "SELECT customer_phone FROM available_policies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00893", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are the customer phone numbers under the policy \"Life Insurance\"?", "sql": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00894", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are the phone numbers of customers using the policy with the code \"Life Insurance\"?", "sql": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00896", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which policy type appears most frequently in the available policies?", "sql": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00898", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the phone numbers of customers using the most common policy type among the available policies.", "sql": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00899", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the policy type used by more than 4 customers.", "sql": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00900", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the policy types more than 4 customers use. Show their type code.", "sql": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00901", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the total and average amount of settlements.", "sql": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00902", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Return the sum and average of all settlement amounts.", "sql": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00903", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the name of services that have been used for more than 2 times in first notification of loss.", "sql": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id, t2.service_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00904", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which services have been used more than twice in first notification of loss? Return the service name.", "sql": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id, t2.service_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00905", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What is the effective date of the claim that has the largest amount of total settlement?", "sql": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id, t1.Effective_Date ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00906", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.", "sql": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id, t1.Effective_Date ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00907", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "How many policies are listed for the customer named \"Dayana Robel\"?", "sql": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00908", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Count the total number of policies used by the customer named \"Dayana Robel\".", "sql": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00909", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What is the name of the customer who has the most policies listed?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00910", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which customer uses the most policies? Give me the customer name.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00911", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are all the policy types of the customer named \"Dayana Robel\"?", "sql": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00912", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Tell me the types of the policy used by the customer named \"Dayana Robel\".", "sql": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00913", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are all the policy types of the customer that has the most policies listed?", "sql": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00914", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "List all the policy types used by the customer enrolled in the most policies.", "sql": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00915", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "List all the services in the alphabetical order.", "sql": "SELECT service_name FROM services ORDER BY service_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00916", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Give me a list of all the service names sorted alphabetically.", "sql": "SELECT service_name FROM services ORDER BY service_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00917", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "How many services are there?", "sql": "SELECT COUNT(*) FROM services;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00918", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Count the total number of available services.", "sql": "SELECT COUNT(*) FROM services;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00919", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the names of users who do not have a first notification of loss record.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00920", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which customers do not have a first notification of loss record? Give me the customer names.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00921", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00922", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00923", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\".", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00924", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00925", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the IDs of customers whose name contains \"Diana\".", "sql": "SELECT customer_id FROM customers WHERE customer_name ILIKE '%Diana%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00926", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are the IDs of customers who have \"Diana\" in part of their names?", "sql": "SELECT customer_id FROM customers WHERE customer_name ILIKE '%Diana%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00927", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are the maximum and minimum settlement amount on record?", "sql": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00928", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Find the maximum and minimum settlement amount.", "sql": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00929", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "List all the customers in increasing order of IDs.", "sql": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00930", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What is the ordered list of customer ids?", "sql": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00931", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\"", "sql": "SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name ILIKE '%Diana%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00932", "db_id": "insurance_fnol", "schema_text": "CREATE TABLE Available_Policies (Policy_ID BIGINT, policy_type_code VARCHAR /* e.g. 'Mortgage Insurance', 'Property Insurance' */, Customer_Phone VARCHAR /* e.g. '(379)862-8274x12620', '(777)537-7792' */);\nCREATE TABLE Claims (Claim_ID BIGINT, FNOL_ID BIGINT, Effective_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_name VARCHAR /* e.g. 'America Jaskolski', 'Cai Zhang' */);\nCREATE TABLE Customers_Policies (Customer_ID BIGINT, Policy_ID BIGINT, Date_Opened DATE, Date_Closed DATE);\nCREATE TABLE First_Notification_of_Loss (FNOL_ID BIGINT, Customer_ID BIGINT, Policy_ID BIGINT, Service_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_name VARCHAR /* e.g. 'Change a policy', 'Close a policy' */);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Effective_Date DATE, Settlement_Amount DOUBLE);", "question": "What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?", "sql": "SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name ILIKE '%Diana%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00933", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many kinds of enzymes are there?", "sql": "SELECT COUNT(*) FROM enzyme;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00934", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the total count of enzymes?", "sql": "SELECT COUNT(*) FROM enzyme;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00935", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "List the name of enzymes in descending lexicographical order.", "sql": "SELECT name FROM enzyme ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00936", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of enzymes in descending order?", "sql": "SELECT name FROM enzyme ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00937", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "List the names and the locations that the enzymes can make an effect.", "sql": "SELECT name, LOCATION FROM enzyme;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00938", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names and locations of all enzymes listed?", "sql": "SELECT name, LOCATION FROM enzyme;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00939", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", "sql": "SELECT MAX(OMIM) FROM enzyme;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00940", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the maximum OMIM value in the database?", "sql": "SELECT MAX(OMIM) FROM enzyme;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00941", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", "sql": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00942", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?", "sql": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00943", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of enzymes who does not produce 'Heme'?", "sql": "SELECT name FROM enzyme WHERE product <> 'Heme';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00944", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of enzymes whose product is not 'Heme'?", "sql": "SELECT name FROM enzyme WHERE product <> 'Heme';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00945", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?", "sql": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00946", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names and trade names of the medcines that are FDA approved?", "sql": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00947", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", "sql": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00948", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?", "sql": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00949", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the ids and names of the medicine that can interact with two or more enzymes?", "sql": "SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id, T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00950", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?", "sql": "SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id, T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00953", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?", "sql": "SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00954", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the id and name of the enzyme that can interact with the most medicines as an activator?", "sql": "SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00955", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "sql": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00956", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "sql": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00957", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the most common interaction type between enzymes and medicine? And how many are there?", "sql": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00958", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the most common types of interactions between enzymes and medicine, and how many types are there?", "sql": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00959", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many medicines have the FDA approval status 'No' ?", "sql": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00960", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many medicines were not approved by the FDA?", "sql": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00961", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many enzymes do not have any interactions?", "sql": "SELECT COUNT(*) FROM enzyme WHERE id NOT IN (SELECT enzyme_id FROM medicine_enzyme_interaction);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00962", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the count of enzymes without any interactions?", "sql": "SELECT COUNT(*) FROM enzyme WHERE id NOT IN (SELECT enzyme_id FROM medicine_enzyme_interaction);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00963", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What is the id and trade name of the medicines can interact with at least 3 enzymes?", "sql": "SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id, T1.trade_name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00964", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?", "sql": "SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id, T1.trade_name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00965", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?", "sql": "SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00966", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?", "sql": "SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00967", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.", "sql": "SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00968", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?", "sql": "SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00969", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.", "sql": "SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00970", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?", "sql": "SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_00971", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many distinct FDA approval statuses are there for the medicines?", "sql": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00972", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many different FDA approval statuses exist for medicines?", "sql": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00973", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "Which enzyme names have the substring \"ALA\"?", "sql": "SELECT name FROM enzyme WHERE name ILIKE '%ALA%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00974", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "What are the names of enzymes that include the string 'ALA'?", "sql": "SELECT name FROM enzyme WHERE name ILIKE '%ALA%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00975", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "find the number of medicines offered by each trade.", "sql": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00976", "db_id": "medicine_enzyme_interaction", "schema_text": "CREATE TABLE enzyme (id BIGINT, name VARCHAR /* e.g. 'ALA dehydratase', 'ALA synthase' */, Location VARCHAR /* e.g. 'Cytosol', 'Mitochondrion' */, Product VARCHAR /* e.g. 'Coproporphyrinogen III', 'Heme' */, Chromosome VARCHAR /* e.g. '10q25.2-q26.3', '11q23.3' */, OMIM BIGINT, Porphyria VARCHAR /* e.g. 'ALA-Dehydratase deficiency', 'acute intermittent porphyria' */);\nCREATE TABLE medicine (id BIGINT, name VARCHAR, Trade_Name VARCHAR, FDA_approved VARCHAR /* e.g. 'No', 'Yes' */);\nCREATE TABLE medicine_enzyme_interaction (enzyme_id BIGINT, medicine_id BIGINT, interaction_type VARCHAR /* e.g. 'inhibitor', 'activitor' */);", "question": "How many medicines are offered by each trade name?", "sql": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00977", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "List all schools and their nicknames in the order of founded year.", "sql": "SELECT school, nickname FROM university ORDER BY founded;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00978", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the different schools and their nicknames, ordered by their founding years?", "sql": "SELECT school, nickname FROM university ORDER BY founded;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00979", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "List all public schools and their locations.", "sql": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00980", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the public schools and what are their locations?", "sql": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00981", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "When was the school with the largest enrollment founded?", "sql": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00982", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14��3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the founded year for the school with the largest enrollment.", "sql": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00983", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the founded year of the newest non public school.", "sql": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00984", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the founded year of the non public school that was founded most recently?", "sql": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00985", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "How many schools are in the basketball match?", "sql": "SELECT COUNT(DISTINCT school_id) FROM basketball_match;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00986", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Count the number of schools that have had basketball matches.", "sql": "SELECT COUNT(DISTINCT school_id) FROM basketball_match;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00987", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the highest acc percent score in the competition?", "sql": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00988", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the highest acc percent across all basketball matches.", "sql": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00989", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the primary conference of the school that has the lowest acc percent score in the competition?", "sql": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00990", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the primary conference of the school with the lowest acc percentage score.", "sql": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00991", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the team name and acc regular season score of the school that was founded for the longest time?", "sql": "SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00992", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.", "sql": "SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_00993", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the location and all games score of the school that has Clemson as its team name.", "sql": "SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00994", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the all games score and location of the school called Clemson?", "sql": "SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00995", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the average enrollment size of the universities that are founded before 1850?", "sql": "SELECT AVG(enrollment) FROM university WHERE founded < 1850;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00996", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the average enrollment of universities founded before 1850.", "sql": "SELECT AVG(enrollment) FROM university WHERE founded < 1850;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_00997", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Show the enrollment and primary_conference of the oldest college.", "sql": "SELECT enrollment, primary_conference FROM university ORDER BY founded LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00998", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the enrollment and primary conference for the university which was founded the earliest?", "sql": "SELECT enrollment, primary_conference FROM university ORDER BY founded LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_00999", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the total and minimum enrollment of all schools?", "sql": "SELECT SUM(enrollment), MIN(enrollment) FROM university;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01000", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the total and minimum enrollments across all schools.", "sql": "SELECT SUM(enrollment), MIN(enrollment) FROM university;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01001", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the total student enrollment for different affiliation type schools.", "sql": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01002", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the total enrollments of universities of each affiliation type?", "sql": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01003", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "How many schools do not participate in the basketball match?", "sql": "SELECT COUNT(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01004", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Count the number of universities that do not participate in the baketball match.", "sql": "SELECT COUNT(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01005", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the schools that were either founded after 1850 or public.", "sql": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01006", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the schools that were either founded before 1850 or are public?", "sql": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01007", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find how many different affiliation types there are.", "sql": "SELECT COUNT(DISTINCT affiliation) FROM university;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01008", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Count the number of different affiliation types.", "sql": "SELECT COUNT(DISTINCT affiliation) FROM university;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01009", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find how many school locations have the word 'NY'.", "sql": "SELECT COUNT(*) FROM university WHERE LOCATION ILIKE '%NY%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01010", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "How many universities have a location that contains NY?", "sql": "SELECT COUNT(*) FROM university WHERE LOCATION ILIKE '%NY%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01011", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.", "sql": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01012", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the names of teams from universities that have a below average enrollment?", "sql": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01013", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.", "sql": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01014", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?", "sql": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01015", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", "sql": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01016", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?", "sql": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01017", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What is the maximum enrollment across all schools?", "sql": "SELECT MAX(Enrollment) FROM university;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01018", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "Return the maximum enrollment across all schools.", "sql": "SELECT MAX(Enrollment) FROM university;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01021", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "List names of all teams in the basketball competition, ordered by all home scores in descending order.", "sql": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01022", "db_id": "university_basketball", "schema_text": "CREATE TABLE basketball_match (Team_ID BIGINT, School_ID BIGINT, Team_Name VARCHAR /* e.g. 'Clemson', 'Duke' */, ACC_Regular_Season VARCHAR /* e.g. '10–6', '13–3' */, ACC_Percent VARCHAR /* e.g. '.563', '.625' */, ACC_Home VARCHAR /* e.g. '6–2', '7–1' */, ACC_Road VARCHAR /* e.g. '3–5', '6–2' */, All_Games VARCHAR /* e.g. '21–14', '24–10' */, All_Games_Percent BIGINT, All_Home VARCHAR /* e.g. '14–2', '14–3' */, All_Road VARCHAR /* e.g. '13–0', '4–8' */, All_Neutral VARCHAR /* e.g. '3–3', '4–3' */);\nCREATE TABLE university (School_ID BIGINT, School VARCHAR /* e.g. 'Lebanon Valley College', 'Rutgers University' */, Location VARCHAR /* e.g. 'Annville, PA', 'Kingston, RI' */, Founded DOUBLE, Affiliation VARCHAR /* e.g. 'Public', 'Private/Methodist' */, Enrollment DOUBLE, Nickname VARCHAR /* e.g. 'Fightin'' Blue Hens', 'Flying Dutchmen' */, Primary_conference VARCHAR /* e.g. 'America East Conference ( D-I )', 'American Athletic Conference ( D-I )' */);", "question": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?", "sql": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01023", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "the names of models that launched between 2002 and 2004.", "sql": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01024", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Which model has the least amount of RAM? List the model name and the amount of RAM.", "sql": "SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01025", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", "sql": "SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01026", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "How many phone hardware models are produced by the company named \"Nokia Corporation\"?", "sql": "SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01027", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", "sql": "SELECT MAX(T1.RAM_MiB), MIN(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01028", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?", "sql": "SELECT AVG(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01029", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.", "sql": "SELECT T2.Hardware_Model_name, T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01030", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", "sql": "SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type ILIKE 'Full';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01031", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".", "sql": "SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = 'LG-P760';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01032", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\"", "sql": "SELECT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01033", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.", "sql": "SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01034", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the name of the company that produced more than one phone model.", "sql": "SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01035", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the maximum, minimum and average number of used kb in screen mode.", "sql": "SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01036", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the name of the phone model launched in year 2002 and with the highest RAM size.", "sql": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01037", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", "sql": "SELECT T1.WiFi, T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = 'LG-P760';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01038", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.", "sql": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = 'Text' OR T1.RAM_MiB > 32;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01039", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"", "sql": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics' OR t2.Company_name = 'Nokia Corporation';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01040", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.", "sql": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = 'Nokia Corporation' AND T1.Type <> 'Text';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01041", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.", "sql": "SELECT DISTINCT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01042", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the number of phones for each accreditation type.", "sql": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01043", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "How many phones belongs to each accreditation type?", "sql": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01044", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the accreditation level that more than 3 phones use.", "sql": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01045", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the details for all chip models.", "sql": "SELECT * FROM chip_model;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01046", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "How many models do not have the wifi function?", "sql": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01047", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Count the number of chip model that do not have wifi.", "sql": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01048", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "List all the model names sorted by their launch year.", "sql": "SELECT model_name FROM chip_model ORDER BY launch_year;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01049", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the average ram mib size of the chip models that are never used by any phone.", "sql": "SELECT AVG(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01050", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the names of the chip models that are not used by any phone with full accreditation type.", "sql": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01051", "db_id": "phone_1", "schema_text": "CREATE TABLE chip_model (Model_name VARCHAR /* e.g. 'X3 Advanced', 'X3 Basic' */, Launch_year DOUBLE, RAM_MiB DOUBLE, ROM_MiB DOUBLE, Slots VARCHAR /* e.g. '1CFII,1SD', '1SD' */, WiFi VARCHAR /* e.g. '802.11b', 'No' */, Bluetooth VARCHAR /* e.g. 'No', '1.2' */);\nCREATE TABLE phone (Company_name VARCHAR /* e.g. 'Nokia Corporation', 'Samsung Electronics Co Ltd' */, Hardware_Model_name VARCHAR /* e.g. 'GT-I9100', 'GT-I9300' */, Accreditation_type VARCHAR /* e.g. 'Full', 'Provisional' */, Accreditation_level VARCHAR /* e.g. 'joyn', 'joyn Hot Fixes' */, Date VARCHAR /* e.g. 'Approved (valid until 03.05.13)', 'Approved (awarded 05.12.12)' */, chip_model VARCHAR /* e.g. 'X5', 'X30 low-end' */, screen_mode BIGINT);\nCREATE TABLE screen_mode (Graphics_mode DOUBLE, Char_cells VARCHAR /* e.g. '20 × 32', '40 × 32' */, Pixels VARCHAR /* e.g. '160 × 256', '320 × 256' */, Hardware_colours DOUBLE, used_kb DOUBLE, map VARCHAR /* e.g. '3000–7FFF', '5800–7FFF' */, Type VARCHAR /* e.g. 'Graphics', 'Text' */);", "question": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.", "sql": "SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01110", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "How many climbers are there?", "sql": "SELECT COUNT(*) FROM climber;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01111", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Count the number of climbers.", "sql": "SELECT COUNT(*) FROM climber;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01112", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "List the names of climbers in descending order of points.", "sql": "SELECT Name FROM climber ORDER BY Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01113", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of the climbers, ordered by points descending?", "sql": "SELECT Name FROM climber ORDER BY Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01114", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "List the names of climbers whose country is not Switzerland.", "sql": "SELECT Name FROM climber WHERE Country <> 'Switzerland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01115", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of climbers who are not from the country of Switzerland?", "sql": "SELECT Name FROM climber WHERE Country <> 'Switzerland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01116", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What is the maximum point for climbers whose country is United Kingdom?", "sql": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01117", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Return the maximum number of points for climbers from the United Kingdom.", "sql": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01118", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "How many distinct countries are the climbers from?", "sql": "SELECT COUNT(DISTINCT Country) FROM climber;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01119", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Count the number of different countries that climbers are from.", "sql": "SELECT COUNT(DISTINCT Country) FROM climber;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01120", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of mountains in ascending alphabetical order?", "sql": "SELECT Name FROM mountain ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01121", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Give the names of mountains in alphabetical order.", "sql": "SELECT Name FROM mountain ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01122", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the countries of mountains with height bigger than 5000?", "sql": "SELECT Country FROM mountain WHERE Height > 5000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01123", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Return the countries of the mountains that have a height larger than 5000.", "sql": "SELECT Country FROM mountain WHERE Height > 5000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01124", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What is the name of the highest mountain?", "sql": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01125", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Return the name of the mountain with the greatest height.", "sql": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01126", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "List the distinct ranges of the mountains with the top 3 prominence.", "sql": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01127", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the different ranges of the 3 mountains with the highest prominence?", "sql": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01128", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show names of climbers and the names of mountains they climb.", "sql": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01129", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of climbers and the corresponding names of mountains that they climb?", "sql": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01130", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the names of climbers and the heights of mountains they climb.", "sql": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01131", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of climbers and the corresponding heights of the mountains that they climb?", "sql": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01132", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the height of the mountain climbed by the climber with the maximum points.", "sql": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01133", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What is the height of the mountain climbined by the climbing who had the most points?", "sql": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01134", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the distinct names of mountains climbed by climbers from country \"West Germany\".", "sql": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01135", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the different names of mountains ascended by climbers from the country of West Germany?", "sql": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01136", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the times used by climbers to climb mountains in Country Uganda.", "sql": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01137", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the times used by climbers who climbed mountains in the country of Uganda?", "sql": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01138", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Please show the countries and the number of climbers from each country.", "sql": "SELECT Country, COUNT(*) FROM climber GROUP BY Country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01139", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "How many climbers are from each country?", "sql": "SELECT Country, COUNT(*) FROM climber GROUP BY Country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01140", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "List the countries that have more than one mountain.", "sql": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01141", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Which countries have more than one mountain?", "sql": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01142", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "List the names of mountains that do not have any climber.", "sql": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01143", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of countains that no climber has climbed?", "sql": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01144", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.", "sql": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01145", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?", "sql": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01146", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the range that has the most number of mountains.", "sql": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01147", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Which range contains the most mountains?", "sql": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01148", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "Show the names of mountains with height more than 5000 or prominence more than 1000.", "sql": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01149", "db_id": "climbing", "schema_text": "CREATE TABLE climber (Climber_ID BIGINT, Name VARCHAR /* e.g. 'Arseneus Butscher', 'Charlie Freedman' */, Country VARCHAR /* e.g. 'West Germany', 'United Kingdom' */, Time VARCHAR /* e.g. '1:13.05.6', '1:14.56.4' */, Points DOUBLE, Mountain_ID BIGINT);\nCREATE TABLE mountain (Mountain_ID BIGINT, Name VARCHAR /* e.g. 'Duwoni / Mt Speke (Vittorio Emanuele Pk)', 'Kibo (Uhuru Pk)' */, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Rwenzori', 'Kilimanjaro' */, Country VARCHAR /* e.g. 'Kenya', 'Tanzania' */);", "question": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?", "sql": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01150", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "How many body builders are there?", "sql": "SELECT COUNT(*) FROM body_builder;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01151", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List the total scores of body builders in ascending order.", "sql": "SELECT Total FROM body_builder ORDER BY Total ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01152", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.", "sql": "SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01153", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What is the average snatch score of body builders?", "sql": "SELECT AVG(Snatch) FROM body_builder;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01154", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the clean and jerk score of the body builder with the highest total score?", "sql": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01155", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the birthdays of people in ascending order of height?", "sql": "SELECT Birth_Date FROM People ORDER BY Height ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01156", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the names of body builders?", "sql": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01157", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the names of body builders whose total score is higher than 300?", "sql": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01158", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What is the name of the body builder with the greatest body weight?", "sql": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01159", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the birth date and birth place of the body builder with the highest total points?", "sql": "SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01160", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the heights of body builders with total score smaller than 315?", "sql": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01161", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What is the average total score of body builders with height bigger than 200?", "sql": "SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01162", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the names of body builders in descending order of total scores?", "sql": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01163", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List each birth place along with the number of people from there.", "sql": "SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01164", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What is the most common birth place of people?", "sql": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01165", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the birth places that are shared by at least two people?", "sql": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01166", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List the height and weight of people in descending order of height.", "sql": "SELECT Height, Weight FROM people ORDER BY Height DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01167", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "Show all information about each body builder.", "sql": "SELECT * FROM body_builder;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01168", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List the names and origins of people who are not body builders.", "sql": "SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01169", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "How many distinct birth places are there?", "sql": "SELECT COUNT(DISTINCT Birth_Place) FROM people;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01170", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "How many persons are not body builders?", "sql": "SELECT COUNT(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01171", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.", "sql": "SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01172", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What are the total scores of the body builders whose birthday contains the string \"January\" ?", "sql": "SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date ILIKE '%January%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01173", "db_id": "body_builder", "schema_text": "CREATE TABLE body_builder (Body_Builder_ID BIGINT, People_ID BIGINT, Snatch DOUBLE, Clean_Jerk DOUBLE, Total DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Al Montoya', 'Cam Fowler' */, Height DOUBLE, Weight DOUBLE, Birth_Date VARCHAR /* e.g. 'December 5, 1991', 'February 13, 1985' */, Birth_Place VARCHAR /* e.g. 'Anchorage, Alaska', 'Farmington Hills, Michigan' */);", "question": "What is the minimum snatch score?", "sql": "SELECT MIN(snatch) FROM body_builder;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01174", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "How many elections are there?", "sql": "SELECT COUNT(*) FROM election;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01175", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "List the votes of elections in descending order.", "sql": "SELECT Votes FROM election ORDER BY Votes DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01176", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "List the dates and vote percents of elections.", "sql": "SELECT Date, Vote_Percent FROM election;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01177", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the minimum and maximum vote percents of elections?", "sql": "SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01178", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the names and parties of representatives?", "sql": "SELECT Name, Party FROM representative;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01179", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the names of representatives whose party is not \"Republican\"?", "sql": "SELECT Name FROM Representative WHERE Party <> 'Republican';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01180", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the life spans of representatives from New York state or Indiana state?", "sql": "SELECT Lifespan FROM representative WHERE State = 'New York' OR State = 'Indiana';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01181", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the names of representatives and the dates of elections they participated in.", "sql": "SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01182", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the names of representatives with more than 10000 votes in election?", "sql": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01183", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the names of representatives in descending order of votes?", "sql": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01184", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What is the party of the representative that has the smallest number of votes.", "sql": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01185", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the lifespans of representatives in descending order of vote percent?", "sql": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01186", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What is the average number of votes of representatives from party \"Republican\"?", "sql": "SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = 'Republican';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01187", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What are the different parties of representative? Show the party name and the number of representatives in each party.", "sql": "SELECT Party, COUNT(*) FROM representative GROUP BY Party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01188", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What is the party that has the largest number of representatives?", "sql": "SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01189", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What parties have at least three representatives?", "sql": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01190", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "What states have at least two representatives?", "sql": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01191", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "List the names of representatives that have not participated in elections listed here.", "sql": "SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01192", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.", "sql": "SELECT Party FROM representative WHERE State = 'New York' INTERSECT SELECT Party FROM representative WHERE State = 'Pennsylvania';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01193", "db_id": "election_representative", "schema_text": "CREATE TABLE election (Election_ID BIGINT, Representative_ID BIGINT, Date VARCHAR /* e.g. '1946', '1949' */, Votes DOUBLE, Vote_Percent DOUBLE, Seats DOUBLE, Place DOUBLE);\nCREATE TABLE representative (Representative_ID BIGINT, Name VARCHAR /* e.g. 'Al Quie', 'Dan Quayle' */, State VARCHAR /* e.g. 'New York', 'Pennsylvania' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Lifespan VARCHAR /* e.g. '1868–1930', '1875–1960' */);", "question": "How many distinct parties are there for representatives?", "sql": "SELECT COUNT(DISTINCT Party) FROM representative;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01194", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many apartment bookings are there in total?", "sql": "SELECT COUNT(*) FROM Apartment_Bookings;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01195", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Count the total number of apartment bookings.", "sql": "SELECT COUNT(*) FROM Apartment_Bookings;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01196", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the start dates and end dates of all the apartment bookings.", "sql": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01197", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the start date and end date of each apartment booking?", "sql": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01198", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show all distinct building descriptions.", "sql": "SELECT DISTINCT building_description FROM Apartment_Buildings;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01199", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Give me a list of all the distinct building descriptions.", "sql": "SELECT DISTINCT building_description FROM Apartment_Buildings;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01200", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the short names of the buildings managed by \"Emma\".", "sql": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01201", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which buildings does \"Emma\" manage? Give me the short names of the buildings.", "sql": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01202", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the addresses and phones of all the buildings managed by \"Brenden\".", "sql": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01203", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the address and phone number of the buildings managed by \"Brenden\"?", "sql": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01204", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the building full names that contain the word \"court\"?", "sql": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name ILIKE '%court%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01205", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find all the building full names containing the word \"court\".", "sql": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name ILIKE '%court%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01206", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the minimum and maximum number of bathrooms of all the apartments?", "sql": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01207", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Give me the minimum and maximum bathroom count among all the apartments.", "sql": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01208", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the average number of bedrooms of all apartments?", "sql": "SELECT AVG(bedroom_count) FROM Apartments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01209", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find the average number of bedrooms of all the apartments.", "sql": "SELECT AVG(bedroom_count) FROM Apartments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01210", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the apartment number and the number of rooms for each apartment.", "sql": "SELECT apt_number, room_count FROM Apartments;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01211", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the apartment number and the room count of each apartment?", "sql": "SELECT apt_number, room_count FROM Apartments;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01212", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the average number of rooms of apartments with type code \"Studio\"?", "sql": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01213", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find the average room count of the apartments that have the \"Studio\" type code.", "sql": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01214", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the apartment numbers of the apartments with type code \"Flat\".", "sql": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01215", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", "sql": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01216", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the first names and last names of all guests", "sql": "SELECT guest_first_name, guest_last_name FROM Guests;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01217", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the first names and last names of all the guests?", "sql": "SELECT guest_first_name, guest_last_name FROM Guests;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01218", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the date of birth for all the guests with gender code \"Male\".", "sql": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01219", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are dates of birth of all the guests whose gender is \"Male\"?", "sql": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01220", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.", "sql": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01221", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the apartment number, start date, and end date of each apartment booking?", "sql": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01222", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the booking start and end dates of the apartments with type code \"Duplex\"?", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01223", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the booking start date and end date for the apartments that have type code \"Duplex\".", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01224", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the booking start and end dates of the apartments with more than 2 bedrooms?", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01225", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find the booking start date and end date for the apartments that have more than two bedrooms.", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01226", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the booking status code of the apartment with apartment number \"Suite 634\"?", "sql": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01227", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Tell me the booking status code for the apartment with number \"Suite 634\".", "sql": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01228", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\".", "sql": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01229", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.", "sql": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01230", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the average room count of the apartments that have booking status code \"Provisional\".", "sql": "SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01231", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the average room count of the apartments whose booking status code is \"Provisional\"?", "sql": "SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01232", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the guest first names, start dates, and end dates of all the apartment bookings.", "sql": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01233", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the guest first name, start date, and end date of each apartment booking?", "sql": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01234", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01235", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")?", "sql": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01236", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\".", "sql": "SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01237", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.", "sql": "SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01238", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the facility codes of apartments with more than 4 bedrooms.", "sql": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01239", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the facility codes of the apartments with more than four bedrooms?", "sql": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01240", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the total number of rooms of all apartments with facility code \"Gym\".", "sql": "SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01241", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find the total number of rooms in the apartments that have facility code \"Gym\".", "sql": "SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01242", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", "sql": "SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01243", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", "sql": "SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01244", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.", "sql": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01245", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.", "sql": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01246", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\".", "sql": "SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01247", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have?", "sql": "SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01248", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the booking status code and the corresponding number of bookings.", "sql": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01249", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.", "sql": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01250", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return all the apartment numbers sorted by the room count in ascending order.", "sql": "SELECT apt_number FROM Apartments ORDER BY room_count ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01251", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Sort the apartment numbers in ascending order of room count.", "sql": "SELECT apt_number FROM Apartments ORDER BY room_count ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01252", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return the apartment number with the largest number of bedrooms.", "sql": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01253", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the apartment number of the apartment with the most beds?", "sql": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01254", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.", "sql": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01255", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.", "sql": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01256", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.", "sql": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01257", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the top three apartment types in terms of the average room count? Give me the", "sql": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01260", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the most common apartment type code.", "sql": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01261", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartment type code appears the most often?", "sql": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01262", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the most common apartment type code among apartments with more than 1 bathroom.", "sql": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01263", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartment type code is the most common among apartments with more than one bathroom?", "sql": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01264", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "sql": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01265", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Return each apartment type code along with the maximum and minimum number of rooms among each type.", "sql": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01268", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many apartments do not have any facility?", "sql": "SELECT COUNT(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01269", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Find the number of apartments that have no facility.", "sql": "SELECT COUNT(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01270", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\"", "sql": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01271", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.", "sql": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01272", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.", "sql": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01273", "db_id": "apartment_rentals", "schema_text": "CREATE TABLE Apartment_Bookings (apt_booking_id BIGINT, apt_id BIGINT, guest_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP);\nCREATE TABLE Apartment_Buildings (building_id BIGINT, building_short_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_full_name VARCHAR /* e.g. 'Avalon Park', 'Barclay Tower' */, building_description VARCHAR /* e.g. 'Studio', 'Flat' */, building_address VARCHAR, building_manager VARCHAR /* e.g. 'Albert', 'Brenden' */, building_phone VARCHAR /* e.g. '(145)411-6406', '(480)480-7401' */);\nCREATE TABLE Apartment_Facilities (apt_id BIGINT, facility_code VARCHAR /* e.g. 'Boardband', 'Gym' */);\nCREATE TABLE Apartments (apt_id BIGINT, building_id BIGINT, apt_type_code VARCHAR /* e.g. 'Flat', 'Duplex' */, apt_number VARCHAR /* e.g. 'Apt. 187', 'Apt. 411' */, bathroom_count BIGINT, bedroom_count BIGINT, room_count BIGINT);\nCREATE TABLE Guests (guest_id BIGINT, gender_code VARCHAR /* e.g. 'Female', 'Male' */, guest_first_name VARCHAR /* e.g. 'Crystal', 'Else' */, guest_last_name VARCHAR /* e.g. 'Bode', 'Crona' */, date_of_birth TIMESTAMP);\nCREATE TABLE View_Unit_Status (apt_id BIGINT, apt_booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.", "sql": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01274", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "How many games are held after season 2007?", "sql": "SELECT COUNT(*) FROM game WHERE season > 2007;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01275", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "List the dates of games by the home team name in descending order.", "sql": "SELECT Date FROM game ORDER BY home_team DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01276", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "List the season, home team, away team of all the games.", "sql": "SELECT season, home_team, away_team FROM game;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01277", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What are the maximum, minimum and average home games each stadium held?", "sql": "SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01278", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What is the average attendance of stadiums with capacity percentage higher than 100%?", "sql": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01279", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?", "sql": "SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01280", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", "sql": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01281", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What are the ids, scores, and dates of the games which caused at least two injury accidents?", "sql": "SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id, T1.score, T1.date HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01282", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "What are the id and name of the stadium where the most injury accidents happened?", "sql": "SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01283", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "Find the id and name of the stadium where the largest number of injury accidents occurred.", "sql": "SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01284", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?", "sql": "SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01285", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "How many different kinds of information sources are there for injury accidents?", "sql": "SELECT COUNT(DISTINCT SOURCE) FROM injury_accident;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01286", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "How many games are free of injury accidents?", "sql": "SELECT COUNT(*) FROM game WHERE id NOT IN (SELECT game_id FROM injury_accident);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01287", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "How many distinct kinds of injuries happened after season 2010?", "sql": "SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01288", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.", "sql": "SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01289", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "Show the name, average attendance, total attendance for stadiums where no accidents happened.", "sql": "SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01290", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "Which stadium name contains the substring \"Bank\"?", "sql": "SELECT name FROM stadium WHERE name ILIKE '%Bank%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01291", "db_id": "game_injury", "schema_text": "CREATE TABLE game (stadium_id BIGINT, id BIGINT, Season BIGINT, Date VARCHAR /* e.g. '10 July 2008', '11 March 2012' */, Home_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Away_team VARCHAR /* e.g. 'Pakhtakor', 'Bunyodkor' */, Score VARCHAR /* e.g. '1–1', '0–0' */, Competition VARCHAR /* e.g. 'League', 'Cup' */);\nCREATE TABLE injury_accident (game_id BIGINT, id BIGINT, Player VARCHAR /* e.g. 'Davide Santon', 'Dejan Stanković' */, Injury VARCHAR /* e.g. 'Knee problem', 'Ankle problem' */, Number_of_matches VARCHAR /* e.g. '1', '2' */, Source VARCHAR /* e.g. 'inter.it' */);\nCREATE TABLE stadium (id BIGINT, name VARCHAR /* e.g. 'New Meadowlands Stadium', 'Bank of America Stadium' */, Home_Games BIGINT, Average_Attendance DOUBLE, Total_Attendance DOUBLE, Capacity_Percentage DOUBLE);", "question": "How many games has each stadium held?", "sql": "SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01293", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List all country and league names.", "sql": "SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01294", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "How many leagues are there in England?", "sql": "SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'England';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01295", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "What is the average weight of all players?", "sql": "SELECT AVG(weight) FROM Player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01296", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "What is the maximum and minimum height of all players?", "sql": "SELECT MAX(weight), MIN(weight) FROM Player;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01297", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List all player names who have an overall rating higher than the average.", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01298", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "What are the names of players who have the best dribbling?", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01299", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01300", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List the names of all left-footed players who have overall rating between 85 and 90.", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01301", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "What is the average rating for right-footed players and left-footed players?", "sql": "SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01302", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?", "sql": "SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01303", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.", "sql": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01304", "db_id": "soccer_1", "schema_text": "CREATE TABLE Country (id BIGINT, name VARCHAR /* e.g. 'Belgium', 'England' */);\nCREATE TABLE League (id BIGINT, country_id BIGINT, name VARCHAR /* e.g. 'Belgium Jupiler League', 'England Premier League' */);\nCREATE TABLE Player (id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height BIGINT, weight BIGINT);\nCREATE TABLE Player_Attributes (id BIGINT, player_fifa_api_id BIGINT, player_api_id BIGINT, date VARCHAR, overall_rating BIGINT, potential BIGINT, preferred_foot VARCHAR /* e.g. 'right', 'left' */, attacking_work_rate VARCHAR /* e.g. 'medium', 'high' */, defensive_work_rate VARCHAR /* e.g. 'medium', 'high' */, crossing BIGINT, finishing BIGINT, heading_accuracy BIGINT, short_passing BIGINT, volleys BIGINT, dribbling BIGINT, curve BIGINT, free_kick_accuracy BIGINT, long_passing BIGINT, ball_control BIGINT, acceleration BIGINT, sprint_speed BIGINT, agility BIGINT, reactions BIGINT, balance BIGINT, shot_power BIGINT, jumping BIGINT, stamina BIGINT, strength BIGINT, long_shots BIGINT, aggression BIGINT, interceptions BIGINT, positioning BIGINT, vision BIGINT, penalties BIGINT, marking BIGINT, standing_tackle BIGINT, sliding_tackle BIGINT, gk_diving BIGINT, gk_handling BIGINT, gk_kicking BIGINT, gk_positioning BIGINT, gk_reflexes BIGINT);\nCREATE TABLE Team (id BIGINT, team_api_id BIGINT, team_fifa_api_id BIGINT, team_long_name VARCHAR, team_short_name VARCHAR);\nCREATE TABLE Team_Attributes (id BIGINT, team_fifa_api_id BIGINT, team_api_id BIGINT, date VARCHAR /* e.g. '2015-09-10 00:00:00', '2011-02-22 00:00:00' */, buildUpPlaySpeed BIGINT, buildUpPlaySpeedClass VARCHAR /* e.g. 'Balanced', 'Fast' */, buildUpPlayDribbling BIGINT, buildUpPlayDribblingClass VARCHAR /* e.g. 'Little', 'Normal' */, buildUpPlayPassing BIGINT, buildUpPlayPassingClass VARCHAR /* e.g. 'Mixed', 'Short' */, buildUpPlayPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, chanceCreationPassing BIGINT, chanceCreationPassingClass VARCHAR /* e.g. 'Normal', 'Risky' */, chanceCreationCrossing BIGINT, chanceCreationCrossingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationShooting BIGINT, chanceCreationShootingClass VARCHAR /* e.g. 'Normal', 'Lots' */, chanceCreationPositioningClass VARCHAR /* e.g. 'Organised', 'Free Form' */, defencePressure BIGINT, defencePressureClass VARCHAR /* e.g. 'Medium', 'Deep' */, defenceAggression BIGINT, defenceAggressionClass VARCHAR /* e.g. 'Press', 'Double' */, defenceTeamWidth BIGINT, defenceTeamWidthClass VARCHAR /* e.g. 'Normal', 'Wide' */, defenceDefenderLineClass VARCHAR /* e.g. 'Cover', 'Offside Trap' */);", "question": "List all of the ids for left-footed players with a height between 180cm and 190cm.", "sql": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'left';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01307", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "How many performances are there?", "sql": "SELECT COUNT(*) FROM performance;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01308", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "List the hosts of performances in ascending order of attendance.", "sql": "SELECT HOST FROM performance ORDER BY Attendance ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01309", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "What are the dates and locations of performances?", "sql": "SELECT Date, LOCATION FROM performance;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01310", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\"", "sql": "SELECT Attendance FROM performance WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01311", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "What is the average number of attendees for performances?", "sql": "SELECT AVG(Attendance) FROM performance;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01312", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "What is the date of the performance with the highest number of attendees?", "sql": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01313", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show different locations and the number of performances at each location.", "sql": "SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01314", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the most common location of performances.", "sql": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01315", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the locations that have at least two performances.", "sql": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01316", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.", "sql": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01317", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the names of members and the location of the performances they attended.", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01319", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "Show the dates of performances with attending members whose roles are \"Violin\".", "sql": "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';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01321", "db_id": "performance_attendance", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Héctor Campana', 'Andrew Moten' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Role VARCHAR /* e.g. 'Viola', 'Violin' */);\nCREATE TABLE member_attendance (Member_ID BIGINT, Performance_ID BIGINT, Num_of_Pieces BIGINT);\nCREATE TABLE performance (Performance_ID DOUBLE, Date VARCHAR /* e.g. 'February 10', 'February 11' */, Host VARCHAR /* e.g. 'Atlanta Thrashers', 'Boston Bruins' */, Location VARCHAR /* e.g. 'Verizon Center', 'Bell Centre' */, Attendance BIGINT);", "question": "List the names of members who did not attend any performance.", "sql": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01507", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "List the names of all the customers in alphabetical order.", "sql": "SELECT customer_details FROM customers ORDER BY customer_details;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01508", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Sort the customer names in alphabetical order.", "sql": "SELECT customer_details FROM customers ORDER BY customer_details;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01509", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find all the policy type codes associated with the customer \"Dayana Robel\"", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01510", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What are the type codes of the policies used by the customer \"Dayana Robel\"?", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01511", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which type of policy is most frequently used? Give me the policy type code.", "sql": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01512", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the type code of the most frequently used policy.", "sql": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01513", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find all the policy types that are used by more than 2 customers.", "sql": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01514", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", "sql": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01515", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the total and average amount paid in claim headers.", "sql": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01516", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What are the total amount and average amount paid in claim headers?", "sql": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01517", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the total amount claimed in the most recently created document.", "sql": "SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01518", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "How much amount in total were claimed in the most recently created document?", "sql": "SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01519", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What is the name of the customer who has made the largest amount of claim in a single claim?", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01520", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customer made the largest amount of claim in a single claim? Return the customer details.", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01521", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What is the name of the customer who has made the minimum amount of payment in one claim?", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01522", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customer made the smallest amount of claim in one claim? Return the customer details.", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01523", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the names of customers who have no policies associated.", "sql": "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;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01524", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What are the names of customers who do not have any policies?", "sql": "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;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01525", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "How many claim processing stages are there in total?", "sql": "SELECT COUNT(*) FROM claims_processing_stages;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01526", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the number of distinct stages in claim processing.", "sql": "SELECT COUNT(*) FROM claims_processing_stages;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01527", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What is the name of the claim processing stage that most of the claims are on?", "sql": "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, t2.claim_status_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01528", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which claim processing stage has the most claims? Show the claim status name.", "sql": "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, t2.claim_status_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01529", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the names of customers whose name contains \"Diana\".", "sql": "SELECT customer_details FROM customers WHERE customer_details ILIKE '%Diana%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01530", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customers have the substring \"Diana\" in their names? Return the customer details.", "sql": "SELECT customer_details FROM customers WHERE customer_details ILIKE '%Diana%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01531", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the names of the customers who have an deputy policy.", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01532", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details.", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01533", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the names of customers who either have an deputy policy or uniformed policy.", "sql": "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';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01534", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details.", "sql": "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';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01535", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the names of all the customers and staff members.", "sql": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01536", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What are the names of the customers and staff members?", "sql": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01537", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the number of records of each policy type and its type code.", "sql": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01538", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "For each policy type, return its type code and its count in the record.", "sql": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01539", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the name of the customer that has been involved in the most policies.", "sql": "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;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01540", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customer have the most policies? Give me the customer details.", "sql": "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;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01541", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "What is the description of the claim status \"Open\"?", "sql": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01542", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the description of the claim status \"Open\".", "sql": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01543", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "How many distinct claim outcome codes are there?", "sql": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01544", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Count the number of distinct claim outcome codes.", "sql": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01545", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Which customer is associated with the latest policy?", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01546", "db_id": "insurance_and_eClaims", "schema_text": "CREATE TABLE Claim_Headers (Claim_Header_ID BIGINT, Claim_Status_Code VARCHAR /* e.g. 'Disputed', 'In Progress' */, Claim_Type_Code VARCHAR /* e.g. 'Overtime Meal Subsidy', 'Handphone Subsidy' */, Policy_ID BIGINT, Date_of_Claim TIMESTAMP, Date_of_Settlement TIMESTAMP, Amount_Claimed DOUBLE, Amount_Piad DOUBLE);\nCREATE TABLE Claims_Documents (Claim_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'Document', 'Medical' */, Created_by_Staff_ID BIGINT, Created_Date BIGINT);\nCREATE TABLE Claims_Processing (Claim_Processing_ID BIGINT, Claim_ID BIGINT, Claim_Outcome_Code VARCHAR /* e.g. 'In progress', 'Disputed' */, Claim_Stage_ID BIGINT, Staff_ID BIGINT);\nCREATE TABLE Claims_Processing_Stages (Claim_Stage_ID BIGINT, Next_Claim_Stage_ID BIGINT, Claim_Status_Name VARCHAR /* e.g. 'Close', 'Open' */, Claim_Status_Description VARCHAR /* e.g. 'Close a claim', 'Open a new claim' */);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Uniformed', 'Deputy' */, Start_Date TIMESTAMP, End_Date TIMESTAMP);\nCREATE TABLE Staff (Staff_ID BIGINT, Staff_Details VARCHAR /* e.g. 'Alexander', 'Allen' */);", "question": "Find the customer who started a policy most recently.", "sql": "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);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01547", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the number of accounts.", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01548", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many accounts are there?", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01549", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many customers have opened an account?", "sql": "SELECT COUNT(DISTINCT customer_id) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01550", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of customers who have an account.", "sql": "SELECT COUNT(DISTINCT customer_id) FROM Accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01551", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the id, the date of account opened, the account name, and other account detail for all accounts.", "sql": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01552", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the ids, date opened, name, and other details for all accounts?", "sql": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01553", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01554", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"?", "sql": "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';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01555", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.", "sql": "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';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01556", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?", "sql": "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';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01557", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the first name and last name for the customer with account name 900.", "sql": "SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01558", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the full names of customers with the account name 900?", "sql": "SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01559", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many customers don't have an account?", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01560", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of customers who do not have an account.", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01561", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the unique first names, last names, and phone numbers for all customers with any account.", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01562", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the distinct first names, last names, and phone numbers for customers with accounts?", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01563", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show customer ids who don't have an account.", "sql": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01564", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the customer ids for customers who do not have an account?", "sql": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01565", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many accounts does each customer have? List the number and customer id.", "sql": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01566", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of accounts corresponding to each customer id.", "sql": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01569", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show id, first name and last name for all customers and the number of accounts.", "sql": "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, T2.customer_first_name, T2.customer_last_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01570", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the the full names and ids for all customers, and how many accounts does each have?", "sql": "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, T2.customer_first_name, T2.customer_last_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01571", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show first name and id for all customers with at least 2 accounts.", "sql": "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, T2.customer_first_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01572", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the first names and ids for customers who have two or more accounts?", "sql": "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, T2.customer_first_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01573", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the number of customers.", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01574", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of customers.", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01575", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the number of customers for each gender.", "sql": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01576", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many customers are there of each gender?", "sql": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01577", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many transactions do we have?", "sql": "SELECT COUNT(*) FROM Financial_transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01578", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of transactions.", "sql": "SELECT COUNT(*) FROM Financial_transactions;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01581", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many transaction does account with name 337 have?", "sql": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01582", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of financial transactions that the account with the name 337 has.", "sql": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01583", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What is the average, minimum, maximum, and total transaction amount?", "sql": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01584", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Return the average, minimum, maximum, and total transaction amounts.", "sql": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01585", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show ids for all transactions whose amounts are greater than the average.", "sql": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01586", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the ids for transactions that have an amount greater than the average amount of a transaction?", "sql": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01587", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the transaction types and the total amount of transactions.", "sql": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01588", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are total transaction amounts for each transaction type?", "sql": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01589", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the account name, id and the number of transactions for each account.", "sql": "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, T2.account_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01590", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Return the names and ids of each account, as well as the number of transactions.", "sql": "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, T2.account_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01591", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the account id with most number of transactions.", "sql": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01592", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What is the id of the account with the most transactions?", "sql": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01593", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the account id and name with at least 4 transactions.", "sql": "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, T2.account_name HAVING COUNT(*) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01594", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the ids and names of accounts with 4 or more transactions?", "sql": "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, T2.account_name HAVING COUNT(*) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01595", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show all product sizes.", "sql": "SELECT DISTINCT product_size FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01596", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the different product sizes?", "sql": "SELECT DISTINCT product_size FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01597", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show all product colors.", "sql": "SELECT DISTINCT product_color FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01598", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the different product colors?", "sql": "SELECT DISTINCT product_color FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01599", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the invoice number and the number of transactions for each invoice.", "sql": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01600", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many transactions correspond to each invoice number?", "sql": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01601", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What is the invoice number and invoice date for the invoice with most number of transactions?", "sql": "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, T2.invoice_number, T2.invoice_date ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01602", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?", "sql": "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, T2.invoice_number, T2.invoice_date ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01603", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many invoices do we have?", "sql": "SELECT COUNT(*) FROM Invoices;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01604", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of invoices.", "sql": "SELECT COUNT(*) FROM Invoices;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01605", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show invoice dates and order id and details for all invoices.", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01606", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the invoice dates, order ids, and order details for all invoices?", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01607", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the order ids and the number of invoices for each order.", "sql": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01608", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many invoices correspond to each order id?", "sql": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01609", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What is the order id and order details for the order more than two invoices.", "sql": "SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id, T2.order_details HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01610", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Return the order ids and details for orderes with two or more invoices.", "sql": "SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id, T2.order_details HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01613", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show all product names without an order.", "sql": "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;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01614", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the names of products that have never been ordered?", "sql": "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;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01615", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show all product names and the total quantity ordered for each product name.", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01616", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are the different product names, and what is the sum of quantity ordered for each product?", "sql": "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;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01617", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the order ids and the number of items in each order.", "sql": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01618", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many order items correspond to each order id?", "sql": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01619", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show the product ids and the number of unique orders containing each product.", "sql": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01620", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many distinct order ids correspond to each product?", "sql": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01621", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show all product names and the number of customers having an order on each product.", "sql": "SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01622", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "What are teh names of the different products, as well as the number of customers who have ordered each product.", "sql": "SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01623", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show order ids and the number of products in each order.", "sql": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01624", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many different products correspond to each order id?", "sql": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01625", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Show order ids and the total quantity in each order.", "sql": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01626", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Give the order ids for all orders, as well as the total product quantity in each.", "sql": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01627", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "How many products were not included in any order?", "sql": "SELECT COUNT(*) FROM products WHERE product_id NOT IN (SELECT product_id FROM Order_items);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01628", "db_id": "customers_and_invoices", "schema_text": "CREATE TABLE Accounts (account_id BIGINT, customer_id BIGINT, date_account_opened TIMESTAMP, account_name BIGINT, other_account_details VARCHAR /* e.g. 'Regular', 'VIP' */);\nCREATE TABLE Customers (customer_id BIGINT, customer_first_name VARCHAR /* e.g. 'Abbey', 'Brennon' */, customer_middle_initial VARCHAR /* e.g. 'B', 'M' */, customer_last_name VARCHAR /* e.g. 'Auer', 'Boyle' */, gender BIGINT, email_address VARCHAR /* e.g. 'anastacio45@example.org', 'destinee06@example.com' */, login_name VARCHAR /* e.g. 'ahmad.hagenes', 'camilla.dubuque' */, login_password VARCHAR /* e.g. '035f2ba1e2a675c4f426', '178613c20728eec256db' */, phone_number VARCHAR /* e.g. '(157)046-6255x98627', '(193)465-6674x4952' */, town_city VARCHAR /* e.g. 'Bruenchester', 'Carleefort' */, state_county_province VARCHAR /* e.g. 'Mississippi', 'Alabama' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Financial_Transactions (transaction_id BIGINT, account_id BIGINT, invoice_number BIGINT, transaction_type VARCHAR /* e.g. 'Payment', 'Refund' */, transaction_date TIMESTAMP, transaction_amount DOUBLE, transaction_comment VARCHAR, other_transaction_details VARCHAR);\nCREATE TABLE Invoice_Line_Items (order_item_id BIGINT, invoice_number BIGINT, product_id BIGINT, product_title VARCHAR /* e.g. 'prod_name' */, product_quantity BIGINT, product_price DOUBLE, derived_product_cost DOUBLE, derived_vat_payable DOUBLE, derived_total_cost DOUBLE);\nCREATE TABLE Invoices (invoice_number BIGINT, order_id BIGINT, invoice_date TIMESTAMP);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, product_quantity BIGINT, other_order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Product_Categories (production_type_code VARCHAR /* e.g. 'Books', 'DVDs' */, product_type_description VARCHAR /* e.g. 'Books', 'Dvd products' */, vat_rating DOUBLE);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, production_type_code VARCHAR /* e.g. 'DVDs', 'Books' */, unit_price DOUBLE, product_name VARCHAR /* e.g. 'Art History', 'Arts' */, product_color VARCHAR /* e.g. 'Yellow', 'Black' */, product_size VARCHAR /* e.g. 'Small', 'Medium' */);", "question": "Count the number of products that were never ordered.", "sql": "SELECT COUNT(*) FROM products WHERE product_id NOT IN (SELECT product_id FROM Order_items);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01629", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "How many churches opened before 1850 are there?", "sql": "SELECT COUNT(*) FROM Church WHERE Open_Date < 1850;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01630", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the name, open date, and organizer for all churches.", "sql": "SELECT name, open_date, organized_by FROM Church;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01631", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "List all church names in descending order of opening date.", "sql": "SELECT name FROM church ORDER BY open_date DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01632", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the opening year in whcih at least two churches opened.", "sql": "SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01633", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the organizer and name for churches that opened between 1830 and 1840.", "sql": "SELECT organized_by, name FROM church WHERE open_date BETWEEN 1830 AND 1840;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01634", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show all opening years and the number of churches that opened in that year.", "sql": "SELECT open_date, COUNT(*) FROM church GROUP BY open_date;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01635", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the name and opening year for three churches that opened most recently.", "sql": "SELECT name, open_date FROM church ORDER BY open_date DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01636", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "How many female people are older than 30 in our record?", "sql": "SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01637", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the country where people older than 30 and younger than 25 are from.", "sql": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01638", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the minimum, maximum, and average age for all people.", "sql": "SELECT MIN(age), MAX(age), AVG(age) FROM people;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01639", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the name and country for all people whose age is smaller than the average.", "sql": "SELECT name, country FROM people WHERE age < (SELECT AVG(age) FROM people);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01640", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the pair of male and female names in all weddings after year 2014", "sql": "SELECT T2.name, T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01641", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the name and age for all male people who don't have a wedding.", "sql": "SELECT name, age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01642", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show all church names except for those that had a wedding in year 2015.", "sql": "SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01643", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show all church names that have hosted least two weddings.", "sql": "SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id, T1.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01644", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the names for all females from Canada having a wedding in year 2016.", "sql": "SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01645", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "How many weddings are there in year 2016?", "sql": "SELECT COUNT(*) FROM wedding WHERE YEAR = 2016;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01646", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show the church names for the weddings of all people older than 30.", "sql": "SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01647", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "Show all countries and the number of people from each country.", "sql": "SELECT country, COUNT(*) FROM people GROUP BY country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01648", "db_id": "wedding", "schema_text": "CREATE TABLE church (Church_ID BIGINT, Name VARCHAR /* e.g. 'Church of Christ', 'Alston Church' */, Organized_by VARCHAR /* e.g. 'Ezra Booth', 'George M. Hinkle' */, Open_Date BIGINT, Continuation_of VARCHAR /* e.g. 'Church of Christ', 'Church of the Latter Day Saints' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Adam Scott', 'Annie Mediate' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Is_Male VARCHAR /* e.g. 'F', 'T' */, Age BIGINT);\nCREATE TABLE wedding (Church_ID BIGINT, Male_ID BIGINT, Female_ID BIGINT, Year BIGINT);", "question": "How many churches have a wedding in year 2016?", "sql": "SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01649", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "How many artists do we have?", "sql": "SELECT COUNT(*) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01650", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Count the number of artists.", "sql": "SELECT COUNT(*) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01651", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show all artist name, age, and country ordered by the yeared they joined.", "sql": "SELECT name, age, country FROM artist ORDER BY Year_Join;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01652", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the names, ages, and countries of artists, sorted by the year they joined?", "sql": "SELECT name, age, country FROM artist ORDER BY Year_Join;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01653", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are all distinct country for artists?", "sql": "SELECT DISTINCT country FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01654", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the different countries for artists.", "sql": "SELECT DISTINCT country FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01655", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show all artist names and the year joined who are not from United States.", "sql": "SELECT name, year_join FROM artist WHERE country <> 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01656", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the names and year of joining for artists that do not have the country \"United States\"?", "sql": "SELECT name, year_join FROM artist WHERE country <> 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01657", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "How many artists are above age 46 and joined after 1990?", "sql": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01658", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Count the number of artists who are older than 46 and joined after 1990.", "sql": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01659", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What is the average and minimum age of all artists from United States.", "sql": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01660", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the average and minimum ages across artists from the United States.", "sql": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01661", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What is the name of the artist who joined latest?", "sql": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01662", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the name of the artist who has the latest join year.", "sql": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01663", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "How many exhibition are there in year 2005 or after?", "sql": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01664", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Count the number of exhibitions that happened in or after 2005.", "sql": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01665", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show theme and year for all exhibitions with ticket prices lower than 15.", "sql": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01666", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the theme and year for all exhibitions that have a ticket price under 15?", "sql": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01667", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show all artist names and the number of exhibitions for each artist.", "sql": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01668", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "How many exhibitions has each artist had?", "sql": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01669", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What is the name and country for the artist with most number of exhibitions?", "sql": "SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id, T2.name, T2.country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01670", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the name and country corresponding to the artist who has had the most exhibitions.", "sql": "SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id, T2.name, T2.country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01671", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show names for artists without any exhibition.", "sql": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01672", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the names of artists that have not had any exhibitions?", "sql": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01673", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What is the theme and artist name for the exhibition with a ticket price higher than the average?", "sql": "SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01674", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.", "sql": "SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01675", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.", "sql": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01676", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", "sql": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01677", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show theme and year for all exhibitions in an descending order of ticket price.", "sql": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01678", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the themes and years for exhibitions, sorted by ticket price descending?", "sql": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01679", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What is the theme, date, and attendance for the exhibition in year 2004?", "sql": "SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01680", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Return the themes, dates, and attendance for exhibitions that happened in 2004.", "sql": "SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01681", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show all artist names who didn't have an exhibition in 2004.", "sql": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01682", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the names of artists who did not have an exhibition in 2004?", "sql": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01683", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.", "sql": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01684", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?", "sql": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01685", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?", "sql": "SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01686", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.", "sql": "SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01687", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "Show all artist names with an average exhibition attendance over 200.", "sql": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id, T3.name HAVING AVG(T1.attendance) > 200;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01688", "db_id": "theme_gallery", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Name VARCHAR /* e.g. 'Jeff Sluman', 'John Daly' */, Country VARCHAR /* e.g. 'United States', 'Fiji' */, Year_Join BIGINT, Age BIGINT);\nCREATE TABLE exhibition (Exhibition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Christmas Tree', 'Christmas stocking' */, Artist_ID BIGINT, Ticket_Price DOUBLE);\nCREATE TABLE exhibition_record (Exhibition_ID BIGINT, Date VARCHAR /* e.g. 'December 12', 'December 13' */, Attendance BIGINT);", "question": "What are the names of artist whose exhibitions draw over 200 attendees on average?", "sql": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id, T3.name HAVING AVG(T1.attendance) > 200;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01689", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the id of the item whose title is \"orange\".", "sql": "SELECT i_id FROM item WHERE title = 'orange';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01690", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "List all information in the item table.", "sql": "SELECT * FROM item;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01691", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the number of reviews.", "sql": "SELECT COUNT(*) FROM review;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01692", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "How many users are there?", "sql": "SELECT COUNT(*) FROM useracct;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01693", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the average and maximum rating of all reviews.", "sql": "SELECT AVG(rating), MAX(rating) FROM review;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01694", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the highest rank of all reviews.", "sql": "SELECT MIN(rank) FROM review;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01695", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "How many different users wrote some reviews?", "sql": "SELECT COUNT(DISTINCT u_id) FROM review;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01696", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "How many different items were reviewed by some users?", "sql": "SELECT COUNT(DISTINCT i_id) FROM review;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01697", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the number of items that did not receive any review.", "sql": "SELECT COUNT(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01698", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the names of users who did not leave any review.", "sql": "SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01699", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the names of goods that receive a rating of 10.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01700", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the titles of items whose rating is higher than the average review rating of all items.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT AVG(rating) FROM review);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01701", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the titles of items that received any rating below 5.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01702", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the titles of items that received both a rating higher than 8 and a rating below 5.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01703", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id, T1.title HAVING AVG(T2.rating) > 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01704", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name of the item with the lowest average rating.", "sql": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id, T1.title ORDER BY AVG(T2.rating) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01705", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "List the titles of all items in alphabetic order .", "sql": "SELECT title FROM item ORDER BY title;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01706", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name of the user who gives the most reviews.", "sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01707", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name and id of the item with the highest average rating.", "sql": "SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id, T1.title, T1.i_id ORDER BY AVG(T2.rating) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01708", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name and id of the good with the highest average rank.", "sql": "SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id, T1.title, T1.i_id ORDER BY AVG(T2.rank) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01709", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "For each user, return the name and the average rating of reviews given by them.", "sql": "SELECT T1.name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01710", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "For each user, find their name and the number of reviews written by them.", "sql": "SELECT T1.name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01711", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name of the user who gave the highest rating.", "sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01712", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name of the source user with the highest average trust score.", "sql": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id, T1.name ORDER BY AVG(trust) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01713", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find each target user's name and average trust score.", "sql": "SELECT T1.name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01714", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the name of the target user with the lowest trust score.", "sql": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01715", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the names of the items that did not receive any review.", "sql": "SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01717", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the number of users who did not write any review.", "sql": "SELECT COUNT(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01718", "db_id": "epinions_1", "schema_text": "CREATE TABLE item (i_id BIGINT, title VARCHAR /* e.g. 'apple', 'avocado' */);\nCREATE TABLE review (a_id BIGINT, u_id BIGINT, i_id BIGINT, rating BIGINT, rank BIGINT);\nCREATE TABLE trust (source_u_id BIGINT, target_u_id BIGINT, trust BIGINT);\nCREATE TABLE useracct (u_id BIGINT, name VARCHAR /* e.g. 'Emily', 'Helen' */);", "question": "Find the number of items without any review.", "sql": "SELECT COUNT(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01719", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "How many players are there?", "sql": "SELECT COUNT(*) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01720", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "List the names of players in ascending order of votes.", "sql": "SELECT Player_name FROM player ORDER BY Votes ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01721", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "What are the gender and occupation of players?", "sql": "SELECT Gender, Occupation FROM player;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01722", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "List the name and residence for players whose occupation is not \"Researcher\".", "sql": "SELECT Player_name, residence FROM player WHERE Occupation <> 'Researcher';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01723", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".", "sql": "SELECT Sponsor_name FROM player WHERE Residence = 'Brandon' OR Residence = 'Birtle';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01724", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "What is the name of the player with the largest number of votes?", "sql": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01725", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show different occupations along with the number of players in each occupation.", "sql": "SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01727", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the residences that have at least two players.", "sql": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01728", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the names of players and names of their coaches.", "sql": "SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01729", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the names of players coached by the rank 1 coach.", "sql": "SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01730", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the names and genders of players with a coach starting after 2011.", "sql": "SELECT T3.Player_name, T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01731", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the names of players and names of their coaches in descending order of the votes of players.", "sql": "SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01732", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "List the names of players that do not have coaches.", "sql": "SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01733", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "Show the residences that have both a player of gender \"M\" and a player of gender \"F\".", "sql": "SELECT Residence FROM player WHERE gender = 'M' INTERSECT SELECT Residence FROM player WHERE gender = 'F';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01734", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "How many coaches does each club has? List the club id, name and the number of coaches.", "sql": "SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id, T1.club_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01735", "db_id": "riding_club", "schema_text": "CREATE TABLE club (Club_ID BIGINT, Club_name VARCHAR /* e.g. 'AIK', 'BK Häcken' */, Region VARCHAR /* e.g. 'USA', 'France' */, Start_year BIGINT);\nCREATE TABLE coach (Coach_ID BIGINT, Coach_name VARCHAR /* e.g. 'James Wong', 'Jameson Tomas' */, Gender VARCHAR /* e.g. 'M', 'F' */, Club_ID BIGINT, Rank BIGINT);\nCREATE TABLE match_result (Rank BIGINT, Club_ID BIGINT, Gold BIGINT, Big_Silver BIGINT, Small_Silver BIGINT, Bronze BIGINT, Points BIGINT);\nCREATE TABLE player (Player_ID BIGINT, Sponsor_name VARCHAR /* e.g. 'Brandon—Souris', 'Charleswood—St. James—Assiniboia' */, Player_name VARCHAR /* e.g. 'Fiona Shiells', 'Jean Luc Bouché' */, Gender VARCHAR /* e.g. 'M', 'F' */, Residence VARCHAR /* e.g. 'Winnipeg', 'Birtle' */, Occupation VARCHAR /* e.g. 'Parliamentarian', 'Retired' */, Votes BIGINT, Rank VARCHAR /* e.g. '2nd', '1st' */);\nCREATE TABLE player_coach (Player_ID BIGINT, Coach_ID BIGINT, Starting_year BIGINT);", "question": "How many gold medals has the club with the most coaches won?", "sql": "SELECT T1.club_id, T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id, T1.gold ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01736", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "How many gymnasts are there?", "sql": "SELECT COUNT(*) FROM gymnast;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01737", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Count the number of gymnasts.", "sql": "SELECT COUNT(*) FROM gymnast;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01738", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "List the total points of gymnasts in descending order.", "sql": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01739", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the total points for all gymnasts, ordered by total points descending?", "sql": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01740", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "List the total points of gymnasts in descending order of floor exercise points.", "sql": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01741", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the total points of gymnasts, ordered by their floor exercise points descending?", "sql": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01742", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What is the average horizontal bar points for all gymnasts?", "sql": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01743", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the average horizontal bar points across all gymnasts.", "sql": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01744", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the names of people in ascending alphabetical order?", "sql": "SELECT Name FROM People ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01745", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the names of people, ordered alphabetically.", "sql": "SELECT Name FROM People ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01746", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the names of gymnasts?", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01747", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the names of the gymnasts.", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01748", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the names of gymnasts whose hometown is not \"Santo Domingo\"?", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01749", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the names of gymnasts who did not grow up in Santo Domingo.", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01750", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What is the age of the tallest person?", "sql": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01751", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the age of the person with the greatest height.", "sql": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01754", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What is the total point count of the youngest gymnast?", "sql": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01755", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the total points of the gymnast with the lowest age.", "sql": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01756", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What is the average age of all gymnasts?", "sql": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01757", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the average age across all gymnasts.", "sql": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01758", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the distinct hometowns of gymnasts with total points more than 57.5?", "sql": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01759", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Give the different hometowns of gymnasts that have a total point score of above 57.5.", "sql": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01760", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the hometowns of gymnasts and the corresponding number of gymnasts?", "sql": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01761", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "How many gymnasts are from each hometown?", "sql": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01762", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What is the most common hometown of gymnasts?", "sql": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01763", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Return the hometown that is most common among gymnasts.", "sql": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01764", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the hometowns that are shared by at least two gymnasts?", "sql": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01765", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Give the hometowns from which two or more gymnasts are from.", "sql": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01766", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "List the names of gymnasts in ascending order by their heights.", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01767", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the names of gymnasts, ordered by their heights ascending?", "sql": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01768", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "List the distinct hometowns that are not associated with any gymnast.", "sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01769", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "From which hometowns did no gymnasts come from?", "sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01770", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Show the hometowns shared by people older than 23 and younger than 20.", "sql": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01771", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "From which hometowns did both people older than 23 and younger than 20 come from?", "sql": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01772", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "How many distinct hometowns did these people have?", "sql": "SELECT COUNT(DISTINCT Hometown) FROM people;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01773", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Count the number of different hometowns of these people.", "sql": "SELECT COUNT(DISTINCT Hometown) FROM people;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01774", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "Show the ages of gymnasts in descending order of total points.", "sql": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01775", "db_id": "gymnast", "schema_text": "CREATE TABLE gymnast (Gymnast_ID BIGINT, Floor_Exercise_Points DOUBLE, Pommel_Horse_Points DOUBLE, Rings_Points DOUBLE, Vault_Points DOUBLE, Parallel_Bars_Points DOUBLE, Horizontal_Bar_Points DOUBLE, Total_Points DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Ashley Pérez Cabrera', 'Clary Sermina Delgado Cid' */, Age DOUBLE, Height DOUBLE, Hometown VARCHAR /* e.g. 'Santo Domingo', 'Bonao' */);", "question": "What are the ages of the gymnasts, ordered descending by their total points?", "sql": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01776", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the total savings balance of all accounts except the account with name ‘Brown’.", "sql": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01777", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the total balance of savings accounts not belonging to someone with the name Brown?", "sql": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01778", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "How many accounts are there in total?", "sql": "SELECT COUNT(*) FROM accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01779", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Count the number of accounts.", "sql": "SELECT COUNT(*) FROM accounts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01780", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the total checking balance in all accounts?", "sql": "SELECT SUM(balance) FROM checking;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01781", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the total balance across checking accounts.", "sql": "SELECT SUM(balance) FROM checking;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01782", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the average checking balance.", "sql": "SELECT AVG(balance) FROM checking;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01783", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the average balance in checking accounts?", "sql": "SELECT AVG(balance) FROM checking;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01784", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "How many accounts have a savings balance above the average savings balance?", "sql": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01785", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the number of accounts with a savings balance that is higher than the average savings balance.", "sql": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01786", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name and id of accounts whose checking balance is below the maximum checking balance.", "sql": "SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01787", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?", "sql": "SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01788", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the checking balance of the account whose owner’s name contains the substring ‘ee’?", "sql": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name ILIKE '%ee%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01789", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.", "sql": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name ILIKE '%ee%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01790", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the checking balance and saving balance in the Brown’s account.", "sql": "SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01791", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the checking and savings balances in accounts belonging to Brown?", "sql": "SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01792", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01793", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01794", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.", "sql": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings));", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01795", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?", "sql": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings));", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01796", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "List all customers’ names in the alphabetical order.", "sql": "SELECT name FROM accounts ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01797", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of all the customers in alphabetical order?", "sql": "SELECT name FROM accounts ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01798", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name of account that has the lowest total checking and saving balance.", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01799", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01800", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.", "sql": "SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01801", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?", "sql": "SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01802", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name and checking balance of the account with the lowest savings balance.", "sql": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01803", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?", "sql": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01804", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the number of checking accounts for each account name.", "sql": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01805", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of customers with accounts, and how many checking accounts do each of them have?", "sql": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01806", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the total saving balance for each account name.", "sql": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01807", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of customers with accounts, and what are the total savings balances for each?", "sql": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01808", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name of accounts whose checking balance is below the average checking balance.", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01809", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of customers with checking balances lower than the average checking balance?", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01810", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the saving balance of the account with the highest checking balance.", "sql": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01811", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the savings balance of the account belonging to the customer with the highest checking balance?", "sql": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01812", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.", "sql": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01813", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", "sql": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01814", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name and checking balance of the account with the lowest saving balance.", "sql": "SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01815", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What is the name and checking balance of the account which has the lowest savings balance?", "sql": "SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01816", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name, checking balance and saving balance of all accounts in the bank.", "sql": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01817", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names, checking balances, and savings balances for all customers?", "sql": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01818", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.", "sql": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01819", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?", "sql": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01820", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01821", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of customers with a higher checking balance than savings balance?", "sql": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01822", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", "sql": "SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01823", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?", "sql": "SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01824", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.", "sql": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01825", "db_id": "small_bank_1", "schema_text": "CREATE TABLE ACCOUNTS (custid BIGINT, name VARCHAR /* e.g. 'Brown', 'Granger' */);\nCREATE TABLE CHECKING (custid BIGINT, balance DOUBLE);\nCREATE TABLE SAVINGS (custid BIGINT, balance DOUBLE);", "question": "What are names and savings balances of the three accounts with the highest savings balances?", "sql": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01826", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "How many main stream browsers whose market share is at least 5 exist?", "sql": "SELECT COUNT(*) FROM browser WHERE market_share >= 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01827", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "List the name of browsers in descending order by market share.", "sql": "SELECT name FROM browser ORDER BY market_share DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01828", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "List the ids, names and market shares of all browsers.", "sql": "SELECT id, name, market_share FROM browser;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01829", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What is the maximum, minimum and average market share of the listed browsers?", "sql": "SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01830", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What is the id and market share of the browser Safari?", "sql": "SELECT id, market_share FROM browser WHERE name = 'Safari';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01831", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", "sql": "SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01832", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?", "sql": "SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01833", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What are the ids and names of the web accelerators that are compatible with two or more browsers?", "sql": "SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id, T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01834", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What is the id and name of the browser that is compatible with the most web accelerators?", "sql": "SELECT T1.id, T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01835", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", "sql": "SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01836", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "How many different kinds of clients are supported by the web clients accelerators?", "sql": "SELECT COUNT(DISTINCT client) FROM web_client_accelerator;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01837", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "How many accelerators are not compatible with the browsers listed ?", "sql": "SELECT COUNT(*) FROM web_client_accelerator WHERE id NOT IN (SELECT accelerator_id FROM accelerator_compatible_browser);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01838", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?", "sql": "SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01839", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.", "sql": "SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01840", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.", "sql": "SELECT name, operating_system FROM web_client_accelerator EXCEPT SELECT T1.name, T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01841", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "Which accelerator name contains substring \"Opera\"?", "sql": "SELECT name FROM web_client_accelerator WHERE name ILIKE '%Opera%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01842", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "Find the number of web accelerators used for each Operating system.", "sql": "SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01843", "db_id": "browser_web", "schema_text": "CREATE TABLE accelerator_compatible_browser (accelerator_id BIGINT, browser_id BIGINT, compatible_since_year BIGINT);\nCREATE TABLE browser (id BIGINT, name VARCHAR /* e.g. 'Firefox', 'Internet Explorer' */, market_share DOUBLE);\nCREATE TABLE Web_client_accelerator (id BIGINT, name VARCHAR /* e.g. 'CACHEbox', 'CProxy' */, Operating_system VARCHAR /* e.g. 'Windows', 'Windows, Mac' */, Client VARCHAR /* e.g. 'user', 'All' */, Connection VARCHAR /* e.g. 'Any', 'Dialup, Wireless, Broadband, DSL' */);", "question": "give me names of all compatible browsers and accelerators in the descending order of compatible year", "sql": "SELECT T2.name, T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01884", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "How many schools are there?", "sql": "SELECT COUNT(*) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01885", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Count the number of schools.", "sql": "SELECT COUNT(*) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01886", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show all school names in alphabetical order.", "sql": "SELECT school_name FROM school ORDER BY school_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01887", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List the name, location, mascot for all schools.", "sql": "SELECT school_name, LOCATION, mascot FROM school;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01888", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "What are the total and average enrollment of all schools?", "sql": "SELECT SUM(enrollment), AVG(enrollment) FROM school;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01889", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "What are the mascots for schools with enrollments above the average?", "sql": "SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01890", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List the name of the school with the smallest enrollment.", "sql": "SELECT school_name FROM school ORDER BY enrollment LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01891", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show the average, maximum, minimum enrollment of all schools.", "sql": "SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01892", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show each county along with the number of schools and total enrollment in each county.", "sql": "SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01893", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "How many donors have endowment for school named \"Glenn\"?", "sql": "SELECT COUNT(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01894", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List each donator name and the amount of endowment in descending order of the amount of endowment.", "sql": "SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01895", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List the names of the schools without any endowment.", "sql": "SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01896", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List all the names of schools with an endowment amount smaller than or equal to 10.", "sql": "SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id, T2.school_name HAVING SUM(T1.amount) <= 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01897", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show the names of donors who donated to both school \"Glenn\" and \"Triton.\"", "sql": "SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01898", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show the names of all the donors except those whose donation amount less than 9.", "sql": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01899", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "List the amount and donor name for the largest amount of donation.", "sql": "SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01900", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "How many budgets are above 3000 in year 2001 or before?", "sql": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01901", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", "sql": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01902", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.", "sql": "SELECT T2.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01903", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show all donor names.", "sql": "SELECT DISTINCT donator_name FROM endowment;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01904", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "How many budget record has a budget amount smaller than the invested amount?", "sql": "SELECT COUNT(*) FROM budget WHERE budgeted < invested;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01905", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "What is the total budget amount for school \"Glenn\" in all years?", "sql": "SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01906", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.", "sql": "SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01907", "db_id": "school_finance", "schema_text": "CREATE TABLE budget (School_id BIGINT, Year BIGINT, Budgeted BIGINT, total_budget_percent_budgeted DOUBLE, Invested BIGINT, total_budget_percent_invested DOUBLE, Budget_invested_percent DOUBLE);\nCREATE TABLE endowment (endowment_id BIGINT, School_id BIGINT, donator_name VARCHAR /* e.g. 'Com. Dom. En Estados Unidos', 'Distrito Nacional' */, amount DOUBLE);\nCREATE TABLE School (School_id BIGINT, School_name VARCHAR /* e.g. 'Bremen', 'Culver Community' */, Location VARCHAR /* e.g. 'Bourbon', 'Bremen' */, Mascot VARCHAR /* e.g. 'Cavaliers', 'Cougars' */, Enrollment BIGINT, IHSAA_Class VARCHAR /* e.g. 'AAA', 'A' */, IHSAA_Football_Class VARCHAR /* e.g. 'A', 'AAA' */, County VARCHAR /* e.g. '50 Marshall', '71 St. Joseph' */);", "question": "Find the names of schools that have more than one donator with donation amount above 8.5.", "sql": "SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.amount > 8.5 GROUP BY T1.school_id, T2.School_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01910", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "How many buildings are there?", "sql": "SELECT COUNT(*) FROM building;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01911", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.", "sql": "SELECT name, street_address, floors FROM building ORDER BY floors;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01912", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "What is the name of the tallest building?", "sql": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01913", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "What are the average, maximum, and minimum number of floors for all buildings?", "sql": "SELECT AVG(floors), MAX(floors), MIN(floors) FROM building;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01914", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the number of buildings with a height above the average or a number of floors above the average.", "sql": "SELECT COUNT(*) FROM building WHERE height_feet > (SELECT AVG(height_feet) FROM building) OR floors > (SELECT AVG(floors) FROM building);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01915", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", "sql": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01916", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".", "sql": "SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01917", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show institution types, along with the number of institutions and total enrollment for each type.", "sql": "SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01918", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the institution type with the largest number of institutions.", "sql": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01919", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.", "sql": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01920", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the name of buildings that do not have any institution.", "sql": "SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01921", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the names of buildings except for those having an institution founded in 2003.", "sql": "SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01922", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "For each building, show the name of the building and the number of institutions in it.", "sql": "SELECT T1.name, COUNT(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01923", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the names and heights of buildings with at least two institutions founded after 1880.", "sql": "SELECT T1.name, T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id, T1.name, T1.height_feet HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01924", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show all the distinct institution types.", "sql": "SELECT DISTINCT TYPE FROM institution;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01925", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show institution names along with the number of proteins for each institution.", "sql": "SELECT T1.institution, COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id, T1.institution;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01926", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"?", "sql": "SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01927", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "Show the protein name and the institution name.", "sql": "SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01928", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "How many proteins are associated with an institution in a building with at least 20 floors?", "sql": "SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01929", "db_id": "protein_institute", "schema_text": "CREATE TABLE building (building_id BIGINT, Name VARCHAR /* e.g. '100 North Tampa', 'Bank of America Tower' */, Street_address VARCHAR /* e.g. '100 North Tampa Street', '101 East Kennedy Boulevard' */, Years_as_tallest VARCHAR /* e.g. '1913–1915', '1915–1926' */, Height_feet BIGINT, Floors BIGINT);\nCREATE TABLE Institution (Institution_id BIGINT, Institution VARCHAR /* e.g. 'Ave Maria University', 'Dakota State University' */, Location VARCHAR /* e.g. 'Atherton, California', 'Ave Maria, Florida' */, Founded DOUBLE, Type VARCHAR /* e.g. 'Private', 'Public' */, Enrollment BIGINT, Team VARCHAR /* e.g. 'Comets', 'Fighting Indians' */, Primary_Conference VARCHAR /* e.g. 'none', 'The Sun' */, building_id BIGINT);\nCREATE TABLE protein (common_name VARCHAR /* e.g. 'Tropical Clawed Frog', 'body louse' */, protein_name VARCHAR /* e.g. 'Centromeric protein E, putative', 'conserved hypothetical protein' */, divergence_from_human_lineage DOUBLE, accession_number VARCHAR /* e.g. 'XP_001843754.1', 'XP_002429877.1' */, sequence_length DOUBLE, sequence_identity_to_human_protein VARCHAR /* e.g. '30%', '32%' */, Institution_id BIGINT);", "question": "How many institutions do not have an associated protein in our record?", "sql": "SELECT COUNT(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01930", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show all the locations where no cinema has capacity over 800.", "sql": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01931", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.", "sql": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01932", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "How many cinema do we have?", "sql": "SELECT COUNT(*) FROM cinema;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01933", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Count the number of cinemas.", "sql": "SELECT COUNT(*) FROM cinema;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01934", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show name, opening year, and capacity for each cinema.", "sql": "SELECT name, openning_year, capacity FROM cinema;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01935", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show the cinema name and location for cinemas with capacity above average.", "sql": "SELECT name, LOCATION FROM cinema WHERE capacity > (SELECT AVG(capacity) FROM cinema);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01936", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What are all the locations with a cinema?", "sql": "SELECT DISTINCT LOCATION FROM cinema;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01937", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Find the distinct locations that has a cinema.", "sql": "SELECT DISTINCT LOCATION FROM cinema;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01938", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show all the cinema names and opening years in descending order of opening year.", "sql": "SELECT name, openning_year FROM cinema ORDER BY openning_year DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01939", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What are the name and location of the cinema with the largest capacity?", "sql": "SELECT name, LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01940", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.", "sql": "SELECT AVG(capacity), MIN(capacity), MAX(capacity) FROM cinema WHERE openning_year >= 2011;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01941", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show each location and the number of cinemas there.", "sql": "SELECT LOCATION, COUNT(*) FROM cinema GROUP BY LOCATION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01942", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What is the location with the most cinemas opened in year 2010 or later?", "sql": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01943", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show all the locations with at least two cinemas with capacity above 300.", "sql": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01944", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Which locations have 2 or more cinemas with capacity over 300?", "sql": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01945", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show the title and director for all films.", "sql": "SELECT title, directed_by FROM film;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01946", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What are the title and director of each film?", "sql": "SELECT title, directed_by FROM film;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01947", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show all directors.", "sql": "SELECT DISTINCT directed_by FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01948", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Who are all the directors?", "sql": "SELECT DISTINCT directed_by FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01949", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "List all directors along with the number of films directed by each director.", "sql": "SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01950", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What is total number of show times per dat for each cinema?", "sql": "SELECT T2.name, SUM(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01951", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What are the title and maximum price of each film?", "sql": "SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id, T2.title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01952", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Give me the title and highest price for each film.", "sql": "SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id, T2.title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01953", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show cinema name, film title, date, and price for each record in schedule.", "sql": "SELECT T3.name, T2.title, T1.date, T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01954", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "What are the title and director of the films without any schedule?", "sql": "SELECT title, directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01955", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Show director with the largest number of show times in total.", "sql": "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM(T1.show_times_per_day) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01956", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Find the locations that have more than one movie theater with capacity above 300.", "sql": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01957", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "In which locations are there more than one movie theater with capacity above 300?", "sql": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01958", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "How many films have the word 'Dummy' in their titles?", "sql": "SELECT COUNT(*) FROM film WHERE title ILIKE '%Dummy%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01959", "db_id": "cinema", "schema_text": "CREATE TABLE cinema (Cinema_ID BIGINT, Name VARCHAR /* e.g. 'Carrowleagh', 'Codling' */, Openning_year BIGINT, Capacity BIGINT, Location VARCHAR /* e.g. 'County Clare', 'County Tipperary' */);\nCREATE TABLE film (Film_ID BIGINT, Rank_in_series BIGINT, Number_in_season BIGINT, Title VARCHAR /* e.g. 'The Case of the Bermuda Triangle', 'The Case of the Mystery Weekend' */, Directed_by VARCHAR /* e.g. 'Bill Schreiner', 'Jesus Salvador Treviño' */, Original_air_date VARCHAR /* e.g. 'October 12–16, 1992', 'October 19–23, 1992' */, Production_code VARCHAR /* e.g. '50011–50015', '50021–50025' */);\nCREATE TABLE schedule (Cinema_ID BIGINT, Film_ID BIGINT, Date VARCHAR /* e.g. '21 May', '11 July' */, Show_times_per_day BIGINT, Price DOUBLE);", "question": "Count the number of films whose title contains the word 'Dummy'.", "sql": "SELECT COUNT(*) FROM film WHERE title ILIKE '%Dummy%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01960", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "Are the customers holding coupons with amount 500 bad or good?", "sql": "SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01961", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many bookings did each customer make? List the customer id, first name, and the count.", "sql": "SELECT T1.customer_id, T1.first_name, COUNT(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T1.first_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01962", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the maximum total amount paid by a customer? List the customer id and amount.", "sql": "SELECT customer_id, SUM(amount_paid) FROM Payments GROUP BY customer_id ORDER BY SUM(amount_paid) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01964", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the id of the product that is booked for 3 times?", "sql": "SELECT product_id FROM products_booked GROUP BY product_id HAVING COUNT(*) = 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01965", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the product description of the product booked with an amount of 102.76?", "sql": "SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01966", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?", "sql": "SELECT T3.booking_start_date, T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_01967", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the names of products whose availability equals to 1?", "sql": "SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01968", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many different product types are there?", "sql": "SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01969", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the first name, last name, and gender of all the good customers? Order by their last name.", "sql": "SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01970", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What is the average amount due for all the payments?", "sql": "SELECT AVG(amount_due) FROM payments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01971", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the maximum, minimum, and average booked count for the products booked?", "sql": "SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01972", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are all the distinct payment types?", "sql": "SELECT DISTINCT payment_type_code FROM payments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01973", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the daily hire costs for the products with substring 'Book' in its name?", "sql": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name ILIKE '%Book%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01974", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "How many products are never booked with amount higher than 200?", "sql": "SELECT COUNT(*) FROM Products_for_hire WHERE product_id NOT IN (SELECT product_id FROM products_booked WHERE booked_amount > 200);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01975", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the coupon amount of the coupons owned by both good and bad customers?", "sql": "SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_01976", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'", "sql": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01977", "db_id": "products_for_hire", "schema_text": "CREATE TABLE Bookings (booking_id BIGINT, customer_id BIGINT, booking_status_code VARCHAR /* e.g. 'Provisional', 'Confirmed' */, returned_damaged_yn BIGINT, booking_start_date TIMESTAMP, booking_end_date TIMESTAMP, count_hired BIGINT, amount_payable DOUBLE, amount_of_discount DOUBLE, amount_outstanding DOUBLE, amount_of_refund DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, coupon_id BIGINT, good_or_bad_customer VARCHAR /* e.g. 'good', 'bad' */, first_name VARCHAR /* e.g. 'Bridget', 'Elinore' */, last_name VARCHAR /* e.g. 'Ankunding', 'Breitenberg' */, gender_mf BIGINT, date_became_customer TIMESTAMP, date_last_hire TIMESTAMP);\nCREATE TABLE Discount_Coupons (coupon_id BIGINT, date_issued TIMESTAMP, coupon_amount DOUBLE);\nCREATE TABLE Payments (payment_id BIGINT, booking_id BIGINT, customer_id BIGINT, payment_type_code VARCHAR /* e.g. 'Cash', 'Credit Card' */, amount_paid_in_full_yn BIGINT, payment_date TIMESTAMP, amount_due DOUBLE, amount_paid DOUBLE);\nCREATE TABLE Products_Booked (booking_id BIGINT, product_id BIGINT, returned_yn BIGINT, returned_late_yn BIGINT, booked_count BIGINT, booked_amount DOUBLE);\nCREATE TABLE Products_for_Hire (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Cutlery', 'Din_Plates' */, daily_hire_cost DOUBLE, product_name VARCHAR /* e.g. 'Book collection A', 'Book collection B' */, product_description VARCHAR /* e.g. 'Anna Karenina', 'One Hundred Years of Solitude' */);\nCREATE TABLE View_Product_Availability (product_id BIGINT, booking_id BIGINT, status_date TIMESTAMP, available_yn BIGINT);", "question": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?", "sql": "SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01993", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "How many gas companies are there?", "sql": "SELECT COUNT(*) FROM company;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01994", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the total number of companies?", "sql": "SELECT COUNT(*) FROM company;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_01995", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "List the company name and rank for all companies in the decreasing order of their sales.", "sql": "SELECT company, rank FROM company ORDER BY Sales_billion DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01996", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the name and rank of every company ordered by descending number of sales?", "sql": "SELECT company, rank FROM company ORDER BY Sales_billion DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01997", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show the company name and the main industry for all companies whose headquarters are not from USA.", "sql": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01998", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the companies and main industries of all companies that are not headquartered in the United States?", "sql": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_01999", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all company names and headquarters in the descending order of market value.", "sql": "SELECT company, headquarters FROM company ORDER BY market_value DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02000", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the names and headquarters of all companies ordered by descending market value?", "sql": "SELECT company, headquarters FROM company ORDER BY market_value DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02001", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show minimum, maximum, and average market value for all companies.", "sql": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02002", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the minimum, maximum, and average market value for every company?", "sql": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02003", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all main industry for all companies.", "sql": "SELECT DISTINCT main_industry FROM company;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02004", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the different main industries for all companies?", "sql": "SELECT DISTINCT main_industry FROM company;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02005", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "List all headquarters and the number of companies in each headquarter.", "sql": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02006", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "For each headquarter, what are the headquarter and how many companies are centered there?", "sql": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02007", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all main industry and total market value in each industry.", "sql": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02008", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the main indstries and total market value for each industry?", "sql": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02009", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "List the main industry with highest total market value and its number of companies.", "sql": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02010", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "For each main industry, what is the total number of companies for the industry with the highest total market value?", "sql": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02011", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show headquarters with at least two companies in the banking industry.", "sql": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02012", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the headquarters with at least two companies in the banking industry?", "sql": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02013", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show gas station id, location, and manager_name for all gas stations ordered by open year.", "sql": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02014", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?", "sql": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02015", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "How many gas station are opened between 2000 and 2005?", "sql": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02016", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the total number of gas stations that opened between 2000 and 2005?", "sql": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02019", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all headquarters with both a company in banking industry and a company in Oil and gas.", "sql": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02020", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?", "sql": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02021", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all headquarters without a company in banking industry.", "sql": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02022", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the headquarters without companies that are in the banking industry?", "sql": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02023", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show the company name with the number of gas station.", "sql": "SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id, T2.company;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02024", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "For each company id, what are the companies and how many gas stations does each one operate?", "sql": "SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id, T2.company;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02025", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show company name and main industry without a gas station.", "sql": "SELECT company, main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02026", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the main industries of the companies without gas stations and what are the companies?", "sql": "SELECT company, main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02027", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show the manager name for gas stations belonging to the ExxonMobil company.", "sql": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02028", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?", "sql": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02029", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show all locations where a gas station for company with market value greater than 100 is located.", "sql": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02030", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the locations that have gas stations owned by a company with a market value greater than 100?", "sql": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02031", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "Show the manager name with most number of gas stations opened after 2000.", "sql": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02032", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the name of the manager with the most gas stations that opened after 2000?", "sql": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02033", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "order all gas station locations by the opening year.", "sql": "SELECT LOCATION FROM gas_station ORDER BY open_year;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02034", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the locations of all the gas stations ordered by opening year?", "sql": "SELECT LOCATION FROM gas_station ORDER BY open_year;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02035", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.", "sql": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion, profits_billion;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02036", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?", "sql": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion, profits_billion;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02037", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.", "sql": "SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02038", "db_id": "gas_company", "schema_text": "CREATE TABLE company (Company_ID BIGINT, Rank BIGINT, Company VARCHAR /* e.g. 'BP', 'Berkshire Hathaway' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Main_Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value DOUBLE);\nCREATE TABLE gas_station (Station_ID BIGINT, Open_Year BIGINT, Location VARCHAR /* e.g. 'Channel Hill', 'Hennry Hill' */, Manager_Name VARCHAR /* e.g. 'Colin Denman', 'BrianWingrave' */, Vice_Manager_Name VARCHAR /* e.g. 'James Holland-Leader', 'JameMarloe' */, Representative_Name VARCHAR /* e.g. 'Simon Gaywood', 'Andrew Russell' */);\nCREATE TABLE station_company (Station_ID BIGINT, Company_ID BIGINT, Rank_of_the_Year BIGINT);", "question": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?", "sql": "SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02039", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many regions do we have?", "sql": "SELECT COUNT(*) FROM region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02040", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Count the number of regions.", "sql": "SELECT COUNT(*) FROM region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02041", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all distinct region names ordered by their labels.", "sql": "SELECT DISTINCT region_name FROM region ORDER BY Label;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02042", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the different region names, ordered by labels?", "sql": "SELECT DISTINCT region_name FROM region ORDER BY Label;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02043", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many parties do we have?", "sql": "SELECT COUNT(DISTINCT party_name) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02044", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Count the number of different parties.", "sql": "SELECT COUNT(DISTINCT party_name) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02045", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show the ministers and the time they took and left office, listed by the time they left office.", "sql": "SELECT minister, took_office, left_office FROM party ORDER BY left_office;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02046", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?", "sql": "SELECT minister, took_office, left_office FROM party ORDER BY left_office;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02047", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show the minister who took office after 1961 or before 1959.", "sql": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02048", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Who are the ministers who took office after 1961 or before 1959?", "sql": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02049", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all ministers who do not belong to Progress Party.", "sql": "SELECT minister FROM party WHERE party_name <> 'Progress Party';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02050", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Which ministers are not a part of the Progress Party?", "sql": "SELECT minister FROM party WHERE party_name <> 'Progress Party';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02051", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all ministers and parties they belong to in descending order of the time they took office.", "sql": "SELECT minister, party_name FROM party ORDER BY took_office DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02052", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", "sql": "SELECT minister, party_name FROM party ORDER BY took_office DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02053", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Return the minister who left office at the latest time.", "sql": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02054", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Which minister left office the latest?", "sql": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02055", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "List member names and their party names.", "sql": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02056", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the names of members and their corresponding parties?", "sql": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02057", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all party names and the number of members in each party.", "sql": "SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02058", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many members are in each party?", "sql": "SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02059", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What is the name of party with most number of members?", "sql": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02060", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Return the name of the party with the most members.", "sql": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02061", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all party names and their region names.", "sql": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02062", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the names of parties and their respective regions?", "sql": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02063", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show names of parties that does not have any members.", "sql": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02064", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the names of parties that have no members?", "sql": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02065", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show the member names which are in both the party with id 3 and the party with id 1.", "sql": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02066", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Which member names are shared among members in the party with the id 3 and the party with the id 1?", "sql": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02067", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show member names that are not in the Progress Party.", "sql": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02068", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Which member names corresponding to members who are not in the Progress Party?", "sql": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02069", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many party events do we have?", "sql": "SELECT COUNT(*) FROM party_events;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02070", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Count the number of party events.", "sql": "SELECT COUNT(*) FROM party_events;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02071", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show party names and the number of events for each party.", "sql": "SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02072", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many events are there for each party?", "sql": "SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02073", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Show all member names who are not in charge of any event.", "sql": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02074", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the names of members who are not in charge of any events?", "sql": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02075", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What are the names of parties with at least 2 events?", "sql": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02076", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Return the names of parties that have two or more events.", "sql": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id, T2.party_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02077", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "What is the name of member in charge of greatest number of events?", "sql": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id, T1.member_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02078", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Return the name of the member who is in charge of the most events.", "sql": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id, T1.member_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02079", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "find the event names that have more than 2 records.", "sql": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02080", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Which event names were used more than twice for party events?", "sql": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02081", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "How many Annual Meeting events happened in the United Kingdom region?", "sql": "SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02082", "db_id": "party_people", "schema_text": "CREATE TABLE member (Member_ID BIGINT, Member_Name VARCHAR /* e.g. 'Anthony Albanese', 'Hon Arch Bevis' */, Party_ID BIGINT, In_office VARCHAR /* e.g. '1996–2007', '1996–present' */);\nCREATE TABLE party (Party_ID BIGINT, Minister VARCHAR /* e.g. 'Ebenezer Ako-Adjei (MP)', 'Dr. Kwame Nkrumah (MP)' */, Took_office BIGINT, Left_office BIGINT, Region_ID BIGINT, Party_name VARCHAR /* e.g. '3', 'Convention Peoples Party' */);\nCREATE TABLE party_events (Event_ID BIGINT, Event_Name VARCHAR /* e.g. 'Annaual Meeting', 'Budget Meeting' */, Party_ID BIGINT, Member_in_charge_ID BIGINT);\nCREATE TABLE region (Region_ID BIGINT, Region_name VARCHAR /* e.g. 'United Kingdom', 'United States' */, Date VARCHAR /* e.g. '1 July 2002', '16 July 2002' */, Label VARCHAR /* e.g. 'Astralwerks', 'Parlophone' */, Format VARCHAR /* e.g. 'CD', '2× LP' */, Catalogue VARCHAR /* e.g. '539 9821', '540 3622' */);", "question": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.", "sql": "SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02083", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "How many pilots are there?", "sql": "SELECT COUNT(*) FROM pilot;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02084", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "List the names of pilots in ascending order of rank.", "sql": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02085", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "What are the positions and teams of pilots?", "sql": "SELECT POSITION, Team FROM pilot;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02086", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "List the distinct positions of pilots older than 30.", "sql": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02087", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the names of pilots from team \"Bradley\" or \"Fordham\".", "sql": "SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02088", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "What is the joined year of the pilot of the highest rank?", "sql": "SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02089", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.", "sql": "SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02090", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the most common nationality of pilots.", "sql": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02091", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.", "sql": "SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02092", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the names of pilots and models of aircrafts they have flied with.", "sql": "SELECT T3.Pilot_name, T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02094", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the fleet series of the aircrafts flied by pilots younger than 34", "sql": "SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02095", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show the names of pilots and the number of records they have.", "sql": "SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02096", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "Show names of pilots that have more than one record.", "sql": "SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02097", "db_id": "pilot_record", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Order_Year BIGINT, Manufacturer VARCHAR /* e.g. 'Gillig', 'NFI' */, Model VARCHAR /* e.g. 'Phantom (High Floor)', 'Advantage (Low Floor)' */, Fleet_Series VARCHAR /* e.g. '300-309 (10)', '310-329 (20)' */, Powertrain VARCHAR /* e.g. 'DD S50 Allison WB-400R', 'Cummins ISC Allison WB-400R' */, Fuel_Propulsion VARCHAR /* e.g. 'Diesel', 'CNG' */);\nCREATE TABLE pilot (Pilot_ID BIGINT, Pilot_name VARCHAR /* e.g. 'Charles Oakley', 'Dan O''Sullivan' */, Rank BIGINT, Age BIGINT, Nationality VARCHAR /* e.g. 'United States', 'Nigeria' */, Position VARCHAR /* e.g. 'Center Team', 'Forward Team' */, Join_Year BIGINT, Team VARCHAR /* e.g. 'Bradley', 'Eau Claire High School' */);\nCREATE TABLE pilot_record (Record_ID BIGINT, Pilot_ID BIGINT, Aircraft_ID BIGINT, Date VARCHAR /* e.g. '2003/01/04', '2004/01/04' */);", "question": "List the names of pilots that do not have any record.", "sql": "SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02098", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What document status codes do we have?", "sql": "SELECT document_status_code FROM Ref_Document_Status;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02099", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the description of document status code 'working'?", "sql": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02100", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What document type codes do we have?", "sql": "SELECT document_type_code FROM Ref_Document_Types;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02101", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the description of document type 'Paper'?", "sql": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02102", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What are the shipping agent names?", "sql": "SELECT shipping_agent_name FROM Ref_Shipping_Agents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02103", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the shipping agent code of shipping agent UPS?", "sql": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02104", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What are all role codes?", "sql": "SELECT role_code FROM ROLES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02105", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the description of role code ED?", "sql": "SELECT role_description FROM ROLES WHERE role_code = 'ED';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02106", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "How many employees do we have?", "sql": "SELECT COUNT(*) FROM Employees;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02107", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the role of the employee named Koby?", "sql": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02108", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List all document ids and receipt dates of documents.", "sql": "SELECT document_id, receipt_date FROM Documents;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02109", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "How many employees does each role have? List role description, id and number of employees.", "sql": "SELECT T1.role_description, T2.role_code, COUNT(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code, T1.role_description;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02110", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List roles that have more than one employee. List the role description and number of employees.", "sql": "SELECT Roles.role_description, COUNT(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code, Roles.role_description HAVING COUNT(Employees.employee_id) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02111", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the document status description of the document with id 1?", "sql": "SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02112", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "How many documents have the status code done?", "sql": "SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02113", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List the document type code for the document with the id 2.", "sql": "SELECT document_type_code FROM Documents WHERE document_id = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02114", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List the document ids for any documents with the status code done and the type code paper.", "sql": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02115", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the name of the shipping agent of the document with id 2?", "sql": "SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02116", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "How many documents were shipped by USPS?", "sql": "SELECT COUNT(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02117", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.", "sql": "SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code, Ref_Shipping_Agents.shipping_agent_name ORDER BY COUNT(Documents.document_id) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02118", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the receipt date of the document with id 3?", "sql": "SELECT receipt_date FROM Documents WHERE document_id = 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02119", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What address was the document with id 4 mailed to?", "sql": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02120", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is the mail date of the document with id 7?", "sql": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02121", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.", "sql": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02122", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.", "sql": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02123", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "What is draft detail of the document with id 7?", "sql": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02124", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "How many draft copies does the document with id 2 have?", "sql": "SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02125", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "Which document has the most draft copies? List its document id and number of draft copies.", "sql": "SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02126", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "Which documents have more than 1 draft copies? List document id and number of draft copies.", "sql": "SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02127", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List all employees in the circulation history of the document with id 1. List the employee's name.", "sql": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02128", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "List the employees who have not showed up in any circulation history of documents. List the employee's name.", "sql": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02129", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.", "sql": "SELECT Employees.employee_name, COUNT(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id, Circulation_History.draft_number, Circulation_History.copy_number, Employees.employee_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02130", "db_id": "cre_Doc_Control_Systems", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. 'ES', 'IE' */);\nCREATE TABLE Circulation_History (document_id BIGINT, draft_number BIGINT, copy_number BIGINT, employee_id BIGINT);\nCREATE TABLE Document_Drafts (document_id BIGINT, draft_number BIGINT, draft_details VARCHAR /* e.g. 'r', 'k' */);\nCREATE TABLE Documents (document_id BIGINT, document_status_code VARCHAR /* e.g. 'working', 'done' */, document_type_code VARCHAR /* e.g. 'Paper', 'CD' */, shipping_agent_code VARCHAR /* e.g. 'UP', 'FE' */, receipt_date TIMESTAMP, receipt_number BIGINT, other_details VARCHAR /* e.g. 'h', 'u' */);\nCREATE TABLE Documents_Mailed (document_id BIGINT, mailed_to_address_id BIGINT, mailing_date TIMESTAMP);\nCREATE TABLE Draft_Copies (document_id BIGINT, draft_number BIGINT, copy_number BIGINT);\nCREATE TABLE Employees (employee_id BIGINT, role_code VARCHAR /* e.g. 'ED', 'PT' */, employee_name VARCHAR /* e.g. 'Clemens', 'Erling' */, other_details VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Document_Status (document_status_code VARCHAR /* e.g. 'done', 'overdue' */, document_status_description VARCHAR /* e.g. 'currently working on', 'mailed' */);\nCREATE TABLE Ref_Document_Types (document_type_code VARCHAR /* e.g. 'CD', 'Hard Drive' */, document_type_description VARCHAR /* e.g. 'b', 'f' */);\nCREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR /* e.g. 'AL', 'FE' */, shipping_agent_name VARCHAR /* e.g. 'Airline', 'Fedex' */, shipping_agent_description VARCHAR /* e.g. 'g', 'k' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'ED', 'MG' */, role_description VARCHAR /* e.g. 'Editor', 'Manager' */);", "question": "For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.", "sql": "SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02131", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "List all department names ordered by their starting date.", "sql": "SELECT dname FROM department ORDER BY mgr_start_date;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02132", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "find all dependent names who have a spouse relation with some employee.", "sql": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02133", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "how many female dependents are there?", "sql": "SELECT COUNT(*) FROM dependent WHERE sex = 'F';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02134", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "Find the names of departments that are located in Houston.", "sql": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02135", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "Return the first names and last names of employees who earn more than 30000 in salary.", "sql": "SELECT fname, lname FROM employee WHERE salary > 30000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02136", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "Find the number of employees of each gender whose salary is lower than 50000.", "sql": "SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02137", "db_id": "company_1", "schema_text": "CREATE TABLE department (Dname VARCHAR /* e.g. 'Administration', 'Headquarters' */, Dnumber BIGINT, Mgr_ssn BIGINT, Mgr_start_date VARCHAR /* e.g. '1981-06-19', '1988-05-22' */);\nCREATE TABLE dependent (Essn BIGINT, Dependent_name VARCHAR /* e.g. 'Alice', 'Abner' */, Sex VARCHAR /* e.g. 'F', 'M' */, Bdate VARCHAR /* e.g. '1942-02-28', '1958-05-03' */, Relationship VARCHAR /* e.g. 'Spouse', 'Daughter' */);\nCREATE TABLE dept_locations (Dnumber BIGINT, Dlocation VARCHAR /* e.g. 'Houston', 'Bellaire' */);\nCREATE TABLE employee (Fname VARCHAR /* e.g. 'Ahmad', 'Alicia' */, Minit VARCHAR /* e.g. 'A', 'B' */, Lname VARCHAR /* e.g. 'Borg', 'English' */, Ssn BIGINT, Bdate VARCHAR /* e.g. '1937-11-10', '1941-06-20' */, Address VARCHAR /* e.g. '291 Berry, Bellaire, TX', '3321 Castle, Spring, TX' */, Sex VARCHAR /* e.g. 'M', 'F' */, Salary BIGINT, Super_ssn BIGINT, Dno BIGINT);\nCREATE TABLE project (Pname VARCHAR /* e.g. 'Computerization', 'Newbenefits' */, Pnumber BIGINT, Plocation VARCHAR /* e.g. 'Houston', 'Stafford' */, Dnum BIGINT);\nCREATE TABLE works_on (Essn BIGINT, Pno BIGINT, Hours DOUBLE);", "question": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.", "sql": "SELECT fname, lname, address FROM employee ORDER BY Bdate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02138", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "what are the event details of the services that have the type code 'Marriage'?", "sql": "SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02139", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "What are the ids and details of events that have more than one participants?", "sql": "SELECT T1.event_id, T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID, T1.event_details HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02140", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "How many events have each participants attended? List the participant id, type and the number.", "sql": "SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID, T1.Participant_Type_Code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02141", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "What are all the the participant ids, type code and details?", "sql": "SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02142", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "How many participants belong to the type 'Organizer'?", "sql": "SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02143", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "List the type of the services in alphabetical order.", "sql": "SELECT service_type_code FROM services ORDER BY service_type_code;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02144", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "List the service id and details for the events.", "sql": "SELECT service_id, event_details FROM EVENTS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02145", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "How many events had participants whose details had the substring 'Dr.'", "sql": "SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details ILIKE '%Dr.%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02146", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "What is the most common participant type?", "sql": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02148", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "What is the id of the event with the most participants?", "sql": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02149", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?", "sql": "SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02150", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "Which services type had both successful and failure event details?", "sql": "SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02151", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "How many events did not have any participants?", "sql": "SELECT COUNT(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02152", "db_id": "local_govt_in_alabama", "schema_text": "CREATE TABLE Events (Event_ID BIGINT, Service_ID BIGINT, Event_Details VARCHAR /* e.g. 'Fail', 'Success' */);\nCREATE TABLE Participants (Participant_ID BIGINT, Participant_Type_Code VARCHAR /* e.g. 'Participant', 'Organizer' */, Participant_Details VARCHAR /* e.g. 'Berniece Weimann', 'Dedrick Ebert' */);\nCREATE TABLE Participants_in_Events (Event_ID BIGINT, Participant_ID BIGINT);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code VARCHAR /* e.g. 'Birth Proof', 'Death Proof' */);", "question": "What are all the distinct participant ids who attended any events?", "sql": "SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02153", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the name of the race held most recently?", "sql": "SELECT name FROM races ORDER BY date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02154", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the name of the race that occurred most recently?", "sql": "SELECT name FROM races ORDER BY date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02155", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the name and date of the most recent race?", "sql": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02156", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the name and date of the race that occurred most recently?", "sql": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02157", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the names of all races held in 2017.", "sql": "SELECT name FROM races WHERE YEAR = 2017;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02158", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all the races that occurred in the year 2017?", "sql": "SELECT name FROM races WHERE YEAR = 2017;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02159", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the distinct names of all races held between 2014 and 2017?", "sql": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02160", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the unique names of all race held between 2014 and 2017?", "sql": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02161", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?", "sql": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02162", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?", "sql": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02163", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?", "sql": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02164", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?", "sql": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02165", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the forename and surname of the driver who has the smallest laptime?", "sql": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02166", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the forename and surname of the driver with the shortest laptime?", "sql": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02167", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id and family name of the driver who has the longest laptime?", "sql": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02168", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id and last name of the driver with the longest laptime?", "sql": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02169", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?", "sql": "SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02170", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?", "sql": "SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02171", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "How many drivers participated in the race Australian Grand Prix held in 2009?", "sql": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02172", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "How many drivers were in the Australian Grand Prix held in 2009?", "sql": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02173", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "How many drivers did not participate in the races held in 2009?", "sql": "SELECT COUNT(DISTINCT driverId) FROM results WHERE raceId NOT IN (SELECT raceId FROM races WHERE YEAR <> 2009);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02174", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "How many drivers did not race in 2009?", "sql": "SELECT COUNT(DISTINCT driverId) FROM results WHERE raceId NOT IN (SELECT raceId FROM races WHERE YEAR <> 2009);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02175", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Give me a list of names and years of races that had any driver whose forename is Lewis?", "sql": "SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02176", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names and years of all races that had a driver with the last name Lewis?", "sql": "SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02177", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the forename and surname of drivers whose nationality is German?", "sql": "SELECT forename, surname FROM drivers WHERE nationality = 'German';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02178", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the first and last name of all the German drivers?", "sql": "SELECT forename, surname FROM drivers WHERE nationality = 'German';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02179", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?", "sql": "SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02180", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?", "sql": "SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02181", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?", "sql": "SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02182", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?", "sql": "SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02183", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find all the forenames of distinct drivers who was in position 1 as standing and won?", "sql": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02184", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are all the different first names of the drivers who are in position as standing and won?", "sql": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02185", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?", "sql": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02186", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?", "sql": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02187", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the numbers of constructors for different nationalities?", "sql": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02188", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "For each nationality, how many different constructors are there?", "sql": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02189", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the numbers of races for each constructor id?", "sql": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02190", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "For each constructor id, how many races are there?", "sql": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02191", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?", "sql": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02192", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of the races held after 2017 in Spain?", "sql": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02193", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the unique names of races that held after 2000 and the circuits were in Spain?", "sql": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02194", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all races held after 2000 in Spain?", "sql": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02195", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.", "sql": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02196", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?", "sql": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02197", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?", "sql": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02198", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?", "sql": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02199", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "List the forenames of all distinct drivers in alphabetical order?", "sql": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02200", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the first names of all the different drivers in alphabetical order?", "sql": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02201", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "List the names of all distinct races in reversed lexicographic order?", "sql": "SELECT DISTINCT name FROM races ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02202", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the different names of all the races in reverse alphabetical order?", "sql": "SELECT DISTINCT name FROM races ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02203", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of races held between 2009 and 2011?", "sql": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02204", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all races held between 2009 and 2011?", "sql": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02205", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of races held after 12:00:00 or before 09:00:00?", "sql": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02206", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?", "sql": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02207", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?", "sql": "SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) > 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02208", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?", "sql": "SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.forename, T1.surname HAVING COUNT(*) > 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02209", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?", "sql": "SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.surname HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.surname HAVING COUNT(*) > 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02210", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?", "sql": "SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.surname HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid, T1.surname HAVING COUNT(*) > 5;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02211", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id and last name of the driver who participated in the most races after 2010?", "sql": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid, T1.surname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02213", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of circuits that belong to UK or Malaysia?", "sql": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02214", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all the circuits that are in the UK or Malaysia?", "sql": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02215", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the id and location of circuits that belong to France or Belgium?", "sql": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02216", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the ids and locations of all circuits in France or Belgium?", "sql": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02217", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the names of Japanese constructors that have once earned more than 5 points?", "sql": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02218", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the names of all the Japanese constructors that have earned more than 5 points?", "sql": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02221", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "sql": "SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02222", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", "sql": "SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02227", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the id, forename and number of races of all drivers who have at least participated in two races?", "sql": "SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid, T1.forename HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02228", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?", "sql": "SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid, T1.forename HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02229", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the driver id and number of races of all drivers who have at most participated in 30 races?", "sql": "SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02230", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "For each id of a driver who participated in at most 30 races, how many races did they participate in?", "sql": "SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02231", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "Find the id and surname of the driver who participated the most number of races?", "sql": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid, T1.surname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02232", "db_id": "formula_1", "schema_text": "CREATE TABLE circuits (circuitId BIGINT, circuitRef VARCHAR, name VARCHAR, location VARCHAR, country VARCHAR, lat DOUBLE, lng DOUBLE, alt VARCHAR /* e.g. '10' */, url VARCHAR);\nCREATE TABLE constructorResults (constructorResultsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, status VARCHAR /* e.g. 'NULL', 'D' */);\nCREATE TABLE constructors (constructorId BIGINT, constructorRef VARCHAR, name VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE constructorStandings (constructorStandingsId BIGINT, raceId BIGINT, constructorId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE drivers (driverId BIGINT, driverRef VARCHAR, number VARCHAR, code VARCHAR, forename VARCHAR, surname VARCHAR, dob VARCHAR, nationality VARCHAR, url VARCHAR);\nCREATE TABLE driverStandings (driverStandingsId BIGINT, raceId BIGINT, driverId BIGINT, points DOUBLE, position BIGINT, positionText VARCHAR, wins BIGINT);\nCREATE TABLE lapTimes (raceId BIGINT, driverId BIGINT, lap BIGINT, position BIGINT, time VARCHAR, milliseconds BIGINT);\nCREATE TABLE pitStops (raceId BIGINT, driverId BIGINT, stop BIGINT, lap BIGINT, time VARCHAR, duration VARCHAR, milliseconds BIGINT);\nCREATE TABLE qualifying (qualifyId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, position BIGINT, q1 VARCHAR, q2 VARCHAR, q3 VARCHAR);\nCREATE TABLE races (raceId BIGINT, year BIGINT, round BIGINT, circuitId BIGINT, name VARCHAR, date VARCHAR, time VARCHAR, url VARCHAR);\nCREATE TABLE results (resultId BIGINT, raceId BIGINT, driverId BIGINT, constructorId BIGINT, number BIGINT, grid BIGINT, position VARCHAR, positionText VARCHAR, positionOrder BIGINT, points DOUBLE, laps BIGINT, time VARCHAR, milliseconds VARCHAR, fastestLap VARCHAR, rank VARCHAR, fastestLapTime VARCHAR, fastestLapSpeed VARCHAR, statusId BIGINT);\nCREATE TABLE seasons (year BIGINT, url VARCHAR);\nCREATE TABLE status (statusId BIGINT, status VARCHAR);", "question": "What are the ids and last names of all drivers who participated in the most races?", "sql": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid, T1.surname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02233", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "How many technicians are there?", "sql": "SELECT COUNT(*) FROM technician;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02234", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the number of technicians?", "sql": "SELECT COUNT(*) FROM technician;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02235", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "List the names of technicians in ascending order of age.", "sql": "SELECT Name FROM technician ORDER BY Age ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02236", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians by ascending order of age?", "sql": "SELECT Name FROM technician ORDER BY Age ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02237", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the team and starting year of technicians?", "sql": "SELECT Team, Starting_Year FROM technician;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02238", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the team and starting year for each technician?", "sql": "SELECT Team, Starting_Year FROM technician;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02239", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "List the name of technicians whose team is not \"NYY\".", "sql": "SELECT Name FROM technician WHERE Team <> 'NYY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02240", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the name of the technician whose team is not 'NYY'?", "sql": "SELECT Name FROM technician WHERE Team <> 'NYY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02241", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show the name of technicians aged either 36 or 37", "sql": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02242", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians aged either 36 or 37?", "sql": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02243", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the starting year of the oldest technicians?", "sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02244", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the starting year for the oldest technician?", "sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02245", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show different teams of technicians and the number of technicians in each team.", "sql": "SELECT Team, COUNT(*) FROM technician GROUP BY Team;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02246", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "For each team, how many technicians are there?", "sql": "SELECT Team, COUNT(*) FROM technician GROUP BY Team;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02247", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Please show the team that has the most number of technicians.", "sql": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02248", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the teams with the most technicians?", "sql": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02249", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show the team that have at least two technicians.", "sql": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02250", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What is the team with at least 2 technicians?", "sql": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02251", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show names of technicians and series of machines they are assigned to repair.", "sql": "SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02252", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of technicians and the machine series that they repair?", "sql": "SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02253", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", "sql": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02254", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", "sql": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02255", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show names of technicians who are assigned to repair machines with value point more than 70.", "sql": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02256", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", "sql": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02257", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show names of technicians and the number of machines they are assigned to repair.", "sql": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02258", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians and how many machines are they assigned to repair?", "sql": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02259", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "List the names of technicians who have not been assigned to repair machines.", "sql": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02260", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the names of the technicians that have not been assigned to repair machines?", "sql": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02261", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".", "sql": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02262", "db_id": "machine_repair", "schema_text": "CREATE TABLE machine (Machine_ID BIGINT, Making_Year BIGINT, Class VARCHAR /* e.g. '125cc' */, Team VARCHAR /* e.g. 'Givi Racing- Honda', 'Honda' */, Machine_series VARCHAR /* e.g. 'RS125' */, value_points DOUBLE, quality_rank BIGINT);\nCREATE TABLE repair (repair_ID BIGINT, name VARCHAR /* e.g. 'Discoverer', 'Discoverer 1' */, Launch_Date VARCHAR /* e.g. '03 Jun 2009', '05 Aug 2014' */, Notes VARCHAR /* e.g. 'Cameras operated successfully.', 'First object in polar orbit' */);\nCREATE TABLE repair_assignment (technician_id BIGINT, repair_ID BIGINT, Machine_ID BIGINT);\nCREATE TABLE technician (technician_id DOUBLE, Name VARCHAR /* e.g. 'Eddie Collins', 'Charlie Hollocher' */, Team VARCHAR /* e.g. 'CLE', 'CWS' */, Starting_Year DOUBLE, Age BIGINT);", "question": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?", "sql": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02263", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "How many entrepreneurs are there?", "sql": "SELECT COUNT(*) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02264", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Count the number of entrepreneurs.", "sql": "SELECT COUNT(*) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02265", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "List the companies of entrepreneurs in descending order of money requested.", "sql": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02266", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the companies of entrepreneurs, ordered descending by amount of money requested?", "sql": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02267", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "List the companies and the investors of entrepreneurs.", "sql": "SELECT Company, Investor FROM entrepreneur;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02268", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the companies and investors that correspond to each entrepreneur?", "sql": "SELECT Company, Investor FROM entrepreneur;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02269", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What is the average money requested by all entrepreneurs?", "sql": "SELECT AVG(Money_Requested) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02270", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the average money requested across all entrepreneurs.", "sql": "SELECT AVG(Money_Requested) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02271", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the names of people in ascending order of weight?", "sql": "SELECT Name FROM People ORDER BY Weight ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02272", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the names of people, ordered by weight ascending.", "sql": "SELECT Name FROM People ORDER BY Weight ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02273", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the names of entrepreneurs?", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02274", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the names of entrepreneurs.", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02275", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02276", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02277", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What is the weight of the shortest person?", "sql": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02278", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the weight of the shortest person.", "sql": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02279", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What is the name of the entrepreneur with the greatest weight?", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02280", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the name of the heaviest entrepreneur.", "sql": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02281", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What is the total money requested by entrepreneurs with height more than 1.85?", "sql": "SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02282", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Give the total money requested by entrepreneurs who are taller than 1.85.", "sql": "SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02283", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?", "sql": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02284", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.", "sql": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02285", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the weights of entrepreneurs in descending order of money requested?", "sql": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02286", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the weights of entrepreneurs, ordered descending by amount of money requested.", "sql": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02287", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?", "sql": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02288", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "How many entrepreneurs correspond to each investor?", "sql": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02289", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What is the investor that has invested in the most number of entrepreneurs?", "sql": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02290", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the investor who have invested in the greatest number of entrepreneurs.", "sql": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02291", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the investors that have invested in at least two entrepreneurs?", "sql": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02292", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Return the investors who have invested in two or more entrepreneurs.", "sql": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02293", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "List the names of entrepreneurs and their companies in descending order of money requested?", "sql": "SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02294", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?", "sql": "SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02295", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "List the names of people that are not entrepreneurs.", "sql": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02296", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the names of people who are not entrepreneurs?", "sql": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02297", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.", "sql": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02298", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?", "sql": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02299", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "How many distinct companies are there?", "sql": "SELECT COUNT(DISTINCT Company) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02300", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Count the number of different companies.", "sql": "SELECT COUNT(DISTINCT Company) FROM entrepreneur;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02301", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Show the company of the tallest entrepreneur.", "sql": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02302", "db_id": "entrepreneur", "schema_text": "CREATE TABLE entrepreneur (Entrepreneur_ID BIGINT, People_ID BIGINT, Company VARCHAR /* e.g. 'Elizabeth Galton Ltd', 'Grails Ltd' */, Money_Requested DOUBLE, Investor VARCHAR /* e.g. 'Duncan Bannatyne', 'Doug Richard' */);\nCREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Alberto Angelini', 'Fabrizio Buonocore' */, Height DOUBLE, Weight DOUBLE, Date_of_Birth VARCHAR /* e.g. '1971-08-05', '1972-02-06' */);", "question": "Which company was started by the entrepreneur with the greatest height?", "sql": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02303", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "How many perpetrators are there?", "sql": "SELECT COUNT(*) FROM perpetrator;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02304", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "List the date of perpetrators in descending order of the number of people killed.", "sql": "SELECT Date FROM perpetrator ORDER BY Killed DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02305", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "List the number of people injured by perpetrators in ascending order.", "sql": "SELECT Injured FROM perpetrator ORDER BY Injured ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02306", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What is the average number of people injured by all perpetrators?", "sql": "SELECT AVG(Injured) FROM perpetrator;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02307", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What is the location of the perpetrator with the largest kills.", "sql": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02308", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the names of people in ascending order of height?", "sql": "SELECT Name FROM People ORDER BY Height ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02309", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the names of perpetrators?", "sql": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02310", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the names of perpetrators whose country is not \"China\"?", "sql": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country <> 'China';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02311", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What is the name of the perpetrator with the biggest weight.", "sql": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02312", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What is the total kills of the perpetrators with height more than 1.84.", "sql": "SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02313", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the names of perpetrators in country \"China\" or \"Japan\"?", "sql": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = 'China' OR T2.Country = 'Japan';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02314", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the heights of perpetrators in descending order of the number of people they injured?", "sql": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02315", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.", "sql": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02316", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What is the country that has the most perpetrators?", "sql": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02317", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "What are the countries that have at least two perpetrators?", "sql": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02318", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "List the names of perpetrators in descending order of the year.", "sql": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02319", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "List the names of people that are not perpetrators.", "sql": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM perpetrator);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02320", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.", "sql": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02321", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "How many distinct locations of perpetrators are there?", "sql": "SELECT COUNT(DISTINCT LOCATION) FROM perpetrator;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02322", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "Show the date of the tallest perpetrator.", "sql": "SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02323", "db_id": "perpetrator", "schema_text": "CREATE TABLE people (People_ID BIGINT, Name VARCHAR /* e.g. 'Brent Boyd', 'Gary Goodner' */, Height DOUBLE, Weight DOUBLE, \"Home Town\" VARCHAR /* e.g. 'Los Angeles, CA', 'Altoona, PA' */);\nCREATE TABLE perpetrator (Perpetrator_ID BIGINT, People_ID BIGINT, Date VARCHAR /* e.g. '04.00 April', '04.26 April 26/27' */, Year DOUBLE, Location VARCHAR /* e.g. 'Beijing', 'Kaio' */, Country VARCHAR /* e.g. 'China', 'India' */, Killed BIGINT, Injured BIGINT);", "question": "In which year did the most recent crime happen?", "sql": "SELECT MAX(YEAR) FROM perpetrator;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02324", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Report the name of all campuses in Los Angeles county.", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02325", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses are located in the county of Los Angeles?", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02326", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What are the names of all campuses located at Chico?", "sql": "SELECT campus FROM campuses WHERE LOCATION = 'Chico';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02327", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses are located in Chico?", "sql": "SELECT campus FROM campuses WHERE LOCATION = 'Chico';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02328", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find all the campuses opened in 1958.", "sql": "SELECT campus FROM campuses WHERE YEAR = 1958;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02329", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What are the campuses that opened in 1958?", "sql": "SELECT campus FROM campuses WHERE YEAR = 1958;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02330", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the name of the campuses opened before 1800.", "sql": "SELECT campus FROM campuses WHERE YEAR < 1800;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02331", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses opened before 1800?", "sql": "SELECT campus FROM campuses WHERE YEAR < 1800;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02332", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Which campus was opened between 1935 and 1939?", "sql": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02333", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses opened between 1935 and 1939?", "sql": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02334", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.", "sql": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02335", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?", "sql": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02336", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee of \"San Jose State University\" in year 1996?", "sql": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02337", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee for San Jose State University in 1996?", "sql": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02338", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee of \"San Francisco State University\" in year 1996?", "sql": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02339", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee for San Francisco State University in 1996?", "sql": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02340", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the count of universities whose campus fee is greater than the average campus fee.", "sql": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02341", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many universities have a campus fee higher than average?", "sql": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02343", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many universities have a campus fee greater than the average?", "sql": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02344", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Which university is in Los Angeles county and opened after 1950?", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02345", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses are located in Los Angeles county and opened after 1950?", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02346", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Which year has the most degrees conferred?", "sql": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02347", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "In what year was the most degrees conferred?", "sql": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02348", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Which campus has the most degrees conferred in all times?", "sql": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02349", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campus has the most degrees conferrred over its entire existence?", "sql": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02350", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Which campus has the most faculties in year 2003?", "sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02351", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campus has the most faculties in 2003?", "sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02352", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the average fee on a CSU campus in 1996", "sql": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02353", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the average fee for a CSU campus in the year of 1996?", "sql": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02354", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the average fee on a CSU campus in 2005?", "sql": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02355", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the average fee for a CSU campus in the year of 2005?", "sql": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02356", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "report the total number of degrees granted between 1998 and 2002.", "sql": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02357", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "how many degrees were conferred between 1998 and 2002?", "sql": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02358", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "For each Orange county campus, report the number of degrees granted after 2000.", "sql": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02359", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the total number of degrees granted after 2000 for each Orange county campus?", "sql": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02360", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02361", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?", "sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02362", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?", "sql": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02363", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?", "sql": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02364", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many campuses are there in Los Angeles county?", "sql": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02365", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many campuses exist are in the county of LA?", "sql": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02366", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "List the campuses in Los Angeles county.", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02367", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What campuses are in Los Angeles county?", "sql": "SELECT campus FROM campuses WHERE county = 'Los Angeles';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02368", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many degrees were conferred in \"San Jose State University\" in 2000?", "sql": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02369", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many degrees were conferred at San Jose State University in 2000?", "sql": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02370", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What are the degrees conferred in \"San Francisco State University\" in 2001.", "sql": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02371", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What degrees were conferred in San Francisco State University in the year 2001?", "sql": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02372", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty is there in total in the year of 2002?", "sql": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02373", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty, in total, are there in the year 2002?", "sql": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02374", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the number of faculty lines in campus \"Long Beach State University\" in 2002?", "sql": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02375", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the number of faculty at Long Beach State University in 2002?", "sql": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02376", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty lines are there in \"San Francisco State University\" in year 2004?", "sql": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02377", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty lines are there at San Francisco State University in 2004?", "sql": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02378", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "List the campus that have between 600 and 1000 faculty lines in year 2004.", "sql": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02379", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What are the campuses that had between 600 and 1000 faculty members in 2004?", "sql": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02380", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?", "sql": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02381", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty members did the university that conferred the most degrees in 2002 have?", "sql": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02382", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?", "sql": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02383", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many faculty members are at the university that gave the least number of degrees in 2001?", "sql": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02384", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many undergraduates are there in \"San Jose State University\" in year 2004?", "sql": "SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02385", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many undergraduates are there at San Jose State", "sql": "SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02386", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "sql": "SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02387", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many people graduated from San Francisco State University in 2004?", "sql": "SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02388", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee of \"San Francisco State University\" in year 2000?", "sql": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02389", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "In the year 2000, what is the campus fee for San Francisco State University?", "sql": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02390", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "Find the campus fee of \"San Jose State University\" in year 2000.", "sql": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02391", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the campus fee in the year 2000 for San Jose State University?", "sql": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02392", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "How many CSU campuses are there?", "sql": "SELECT COUNT(*) FROM campuses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02393", "db_id": "csu_1", "schema_text": "CREATE TABLE Campuses (Id BIGINT, Campus VARCHAR, Location VARCHAR, County VARCHAR /* e.g. 'Los Angeles', 'San Diego' */, Year BIGINT);\nCREATE TABLE csu_fees (Campus BIGINT, Year BIGINT, CampusFee BIGINT);\nCREATE TABLE degrees (Year BIGINT, Campus BIGINT, Degrees BIGINT);\nCREATE TABLE discipline_enrollments (Campus BIGINT, Discipline BIGINT, Year BIGINT, Undergraduate BIGINT, Graduate BIGINT);\nCREATE TABLE enrollments (Campus BIGINT, Year BIGINT, TotalEnrollment_AY BIGINT, FTE_AY BIGINT);\nCREATE TABLE faculty (Campus BIGINT, Year BIGINT, Faculty DOUBLE);", "question": "What is the total number of campuses?", "sql": "SELECT COUNT(*) FROM campuses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02394", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "How many candidates are there?", "sql": "SELECT COUNT(*) FROM candidate;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02395", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Count the number of candidates.", "sql": "SELECT COUNT(*) FROM candidate;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02396", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Which poll resource provided the most number of candidate information?", "sql": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02397", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Return the poll resource associated with the most candidates.", "sql": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02398", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "what are the top 3 highest support rates?", "sql": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02399", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Return the top 3 greatest support rates.", "sql": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02400", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Find the id of the candidate who got the lowest oppose rate.", "sql": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02401", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What is the id of the candidate with the lowest oppose rate?", "sql": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02402", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", "sql": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02403", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?", "sql": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02404", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "which poll source does the highest oppose rate come from?", "sql": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02405", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Return the poll source corresponding to the candidate who has the oppose rate.", "sql": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02406", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "List all people names in the order of their date of birth from old to young.", "sql": "SELECT name FROM people ORDER BY date_of_birth;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02407", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the names of all people, ordered by their date of birth?", "sql": "SELECT name FROM people ORDER BY date_of_birth;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02408", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Find the average height and weight for all males (sex is M).", "sql": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02409", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the average height and weight across males (sex is M)?", "sql": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02410", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "find the names of people who are taller than 200 or lower than 190.", "sql": "SELECT name FROM people WHERE height > 200 OR height < 190;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02411", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the names of people who have a height greater than 200 or less than 190?", "sql": "SELECT name FROM people WHERE height > 200 OR height < 190;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02412", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Find the average and minimum weight for each gender.", "sql": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02413", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the average and minimum weights for people of each sex?", "sql": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02414", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Find the name and gender of the candidate who got the highest support rate.", "sql": "SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02415", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What is the name and sex of the candidate with the highest support rate?", "sql": "SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02418", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "which gender got the highest average uncertain ratio.", "sql": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02419", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What is the sex of the candidate who had the highest unsure rate?", "sql": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02420", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "what are the names of people who did not participate in the candidate election.", "sql": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02421", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Give the names of people who did not participate in the candidate election.", "sql": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02422", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Find the names of the candidates whose support percentage is lower than their oppose rate.", "sql": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02423", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the names of candidates who have a lower support rate than oppose rate?", "sql": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02424", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "how many people are there whose weight is higher than 85 for each gender?", "sql": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02425", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Count the number of people of each sex who have a weight higher than 85.", "sql": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02426", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", "sql": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02427", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?", "sql": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02428", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "list all female (sex is F) candidate names in the alphabetical order.", "sql": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02429", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the names of all female candidates in alphabetical order (sex is F)?", "sql": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02430", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "find the name of people whose height is lower than the average.", "sql": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02431", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What are the names of people who are shorter than average?", "sql": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02432", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "List all info about all people.", "sql": "SELECT * FROM people;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02433", "db_id": "candidate_poll", "schema_text": "CREATE TABLE candidate (Candidate_ID BIGINT, People_ID BIGINT, Poll_Source VARCHAR /* e.g. 'Newsweek Poll', 'WNBC/Marist Poll' */, Date VARCHAR /* e.g. 'Nov 9–10, 2006', 'Feb 12–15, 2007' */, Support_rate DOUBLE, Consider_rate DOUBLE, Oppose_rate DOUBLE, Unsure_rate DOUBLE);\nCREATE TABLE people (People_ID BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Name VARCHAR /* e.g. 'Dominique Daquin', 'Frantz Granvorka' */, Date_of_Birth VARCHAR /* e.g. '01.09.1977', '03.02.1976' */, Height DOUBLE, Weight DOUBLE);", "question": "What is all the information about all people?", "sql": "SELECT * FROM people;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02434", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the titles of all movies directed by steven spielberg.", "sql": "SELECT title FROM Movie WHERE director = 'Steven Spielberg';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02435", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all movies directed by Steven Spielberg?", "sql": "SELECT title FROM Movie WHERE director = 'Steven Spielberg';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02436", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the name of the movie produced after 2000 and directed by James Cameron?", "sql": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02437", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles of all movies that James Cameron directed after 2000?", "sql": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02438", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "How many movies were made before 2000?", "sql": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02440", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Who is the director of movie Avatar?", "sql": "SELECT director FROM Movie WHERE title = 'Avatar';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02441", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Who directed Avatar?", "sql": "SELECT director FROM Movie WHERE title = 'Avatar';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02442", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "How many reviewers listed?", "sql": "SELECT COUNT(*) FROM Reviewer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02443", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "How many reviewers are there?", "sql": "SELECT COUNT(*) FROM Reviewer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02444", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the id of the reviewer whose name has substring “Mike”?", "sql": "SELECT rID FROM Reviewer WHERE name ILIKE '%Mike%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02445", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the id of the reviewer whose name includes the word \"Mike\"?", "sql": "SELECT rID FROM Reviewer WHERE name ILIKE '%Mike%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02446", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the reviewer id of Daniel Lewis?", "sql": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02447", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the id of the reviewer named Daniel Lewis?", "sql": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02448", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the total number of ratings that has more than 3 stars?", "sql": "SELECT COUNT(*) FROM Rating WHERE stars > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02449", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "How many movie ratings have more than 3 stars?", "sql": "SELECT COUNT(*) FROM Rating WHERE stars > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02450", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the lowest and highest rating star?", "sql": "SELECT MAX(stars), MIN(stars) FROM Rating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02451", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the maximum and mininum number of stars a rating can receive?", "sql": "SELECT MAX(stars), MIN(stars) FROM Rating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02452", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.", "sql": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02453", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?", "sql": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02454", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.", "sql": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02455", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?", "sql": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02456", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the average rating star for each reviewer?", "sql": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02457", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the average number of stars that each reviewer awards for a movie?", "sql": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02458", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the titles of all movies that have no ratings.", "sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02459", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles of all movies that have not been rated?", "sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02464", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the name of the most recent movie?", "sql": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02465", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the title of the newest movie?", "sql": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02468", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?", "sql": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02469", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all movies that were created after the most recent Steven Spielberg film?", "sql": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02470", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?", "sql": "SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02471", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?", "sql": "SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02472", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.", "sql": "SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name, T2.title, T1.stars;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02473", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?", "sql": "SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name, T2.title, T1.stars;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02474", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the names of all reviewers who have contributed three or more ratings.", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID, T2.name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02475", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all reviewers that have rated 3 or more movies?", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID, T2.name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02476", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the names of all reviewers who rated Gone with the Wind.", "sql": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02477", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all the different reviewers who rates Gone with the Wind?", "sql": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02478", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the names of all directors whose movies are rated by Sarah Martinez.", "sql": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02479", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?", "sql": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02480", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.", "sql": "SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02481", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?", "sql": "SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02482", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Return all reviewer names and movie names together in a single list.", "sql": "SELECT name FROM Reviewer UNION SELECT title FROM Movie;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02483", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all the reviewers and movie names?", "sql": "SELECT name FROM Reviewer UNION SELECT title FROM Movie;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02484", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the titles of all movies not reviewed by Chris Jackson.", "sql": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02485", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles of all movies that were not reviewed by Chris Jackson?", "sql": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02486", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.", "sql": "SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02487", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For all directors who have directed more than one movie, what movies have they directed and what are their names?", "sql": "SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02488", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.", "sql": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02489", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?", "sql": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02490", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of the directors who made exactly one movie?", "sql": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02491", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all directors who made one movie?", "sql": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02492", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of the directors who made exactly one movie excluding director NULL?", "sql": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02493", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all directors who have made one movie except for the director named NULL?", "sql": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02494", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "How many movie reviews does each director get?", "sql": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02495", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For each director, how many reviews have they received?", "sql": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02496", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the movies with the highest average rating. Return the movie titles and average rating.", "sql": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID, T2.title ORDER BY AVG(T1.stars) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02497", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the movie titles with the highest average rating and what are those ratings?", "sql": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID, T2.title ORDER BY AVG(T1.stars) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02498", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the movie titles and average rating of the movies with the lowest average rating?", "sql": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID, T2.title ORDER BY AVG(T1.stars) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02509", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the name of the movie that has been reviewed the most?", "sql": "SELECT T2.title, T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID, T2.title ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02510", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles of all movies that have rating star is between 3 and 5?", "sql": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02511", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the titles of all movies that have between 3 and 5 stars?", "sql": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02512", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the names of reviewers who had given higher than 3 star ratings.", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02513", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of the reviewers who have rated a movie more than 3 stars before?", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02514", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the average rating star for each movie that are not reviewed by Brittany Harris.", "sql": "SELECT mID, AVG(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02515", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What is the average rating for each movie that has never been reviewed by Brittany Harris?", "sql": "SELECT mID, AVG(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02516", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the ids of the movies that are not reviewed by Brittany Harris.", "sql": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02517", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?", "sql": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02518", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the average rating star for each movie that received at least 2 ratings.", "sql": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02519", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "For each movie that received more than 3 reviews, what is the average rating?", "sql": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02520", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "find the ids of reviewers who did not give 4 star.", "sql": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02521", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the ids of all reviewers who did not give 4 stars?", "sql": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02522", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "Find the ids of reviewers who didn't only give 4 star.", "sql": "SELECT rID FROM Rating WHERE stars <> 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02523", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the ids of all reviewers who have not given 4 stars at least once?", "sql": "SELECT rID FROM Rating WHERE stars <> 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02524", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?", "sql": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02525", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?", "sql": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02526", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are names of the movies that are either made before 1980 or directed by James Cameron?", "sql": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02527", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all movies made before 1980 or had James Cameron as the director?", "sql": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02528", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of reviewers who had rated 3 star and 4 star?", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02529", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all reviewers that have given 3 or 4 stars for reviews?", "sql": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02530", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of movies that get 3 star and 4 star?", "sql": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02531", "db_id": "movie_1", "schema_text": "CREATE TABLE Movie (mID BIGINT, title VARCHAR /* e.g. 'Avatar', 'E.T.' */, year BIGINT, director VARCHAR /* e.g. 'James Cameron', 'Steven Spielberg' */);\nCREATE TABLE Rating (rID BIGINT, mID BIGINT, stars BIGINT, ratingDate DATE);\nCREATE TABLE Reviewer (rID BIGINT, name VARCHAR /* e.g. 'Ashley White', 'Brittany Harris' */);", "question": "What are the names of all movies that received 3 or 4 stars?", "sql": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02532", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "How many counties are there?", "sql": "SELECT COUNT(*) FROM county_public_safety;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02533", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Count the number of countries.", "sql": "SELECT COUNT(*) FROM county_public_safety;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02534", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "List the names of counties in descending order of population.", "sql": "SELECT Name FROM county_public_safety ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02535", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of the counties of public safety, ordered by population descending?", "sql": "SELECT Name FROM county_public_safety ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02536", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "List the distinct police forces of counties whose location is not on east side.", "sql": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02537", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the different police forces of counties that are not located in the East?", "sql": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02538", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the minimum and maximum crime rate of counties?", "sql": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02539", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Return the minimum and maximum crime rates across all counties.", "sql": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02540", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the crime rates of counties in ascending order of number of police officers.", "sql": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02541", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the crime rates of counties sorted by number of offices ascending?", "sql": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02542", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of cities in ascending alphabetical order?", "sql": "SELECT Name FROM city ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02543", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Return the names of cities, ordered alphabetically.", "sql": "SELECT Name FROM city ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02544", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the percentage of hispanics in cities with the black percentage higher than 10?", "sql": "SELECT Hispanic FROM city WHERE Black > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02545", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Return the hispanic percentage for cities in which the black percentage is greater than 10.", "sql": "SELECT Hispanic FROM city WHERE Black > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02546", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "List the name of the county with the largest population.", "sql": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02547", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What is the name of the county with the greatest population?", "sql": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02548", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "List the names of the city with the top 5 white percentages.", "sql": "SELECT Name FROM city ORDER BY White DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02549", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of the five cities with the greatest proportion of white people?", "sql": "SELECT Name FROM city ORDER BY White DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02550", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show names of cities and names of counties they are in.", "sql": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02551", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of cities, as well as the names of the counties they correspond to?", "sql": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02552", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show white percentages of cities and the crime rates of counties they are in.", "sql": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02553", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?", "sql": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02554", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the name of cities in the county that has the largest number of police officers.", "sql": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02555", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of cities that are in the county with the most police officers?", "sql": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02556", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the number of cities in counties that have a population more than 20000.", "sql": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02557", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "How many cities are in counties that have populations of over 20000?", "sql": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02558", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the crime rate of counties with a city having white percentage more than 90.", "sql": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02559", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the crime rates of counties that contain cities that have white percentages of over 90?", "sql": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02560", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Please show the police forces and the number of counties with each police force.", "sql": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02561", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "How many counties correspond to each police force?", "sql": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02562", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What is the location shared by most counties?", "sql": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02563", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Which location has the most corresponding counties?", "sql": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02564", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "List the names of counties that do not have any cities.", "sql": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02565", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of counties that do not contain any cities?", "sql": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02566", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the police force shared by counties with location on the east and west.", "sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02567", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Which police forces operate in both counties that are located in the East and in the West?", "sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02568", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the names of cities in counties that have a crime rate less than 100.", "sql": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02569", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the names of cities that are in counties that have a crime rate below 100?", "sql": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02570", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "Show the case burden of counties in descending order of population.", "sql": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02571", "db_id": "county_public_safety", "schema_text": "CREATE TABLE city (City_ID BIGINT, County_ID BIGINT, Name VARCHAR /* e.g. 'Adjuntas', 'Aguada' */, White DOUBLE, Black DOUBLE, Amerindian DOUBLE, Asian DOUBLE, Multiracial DOUBLE, Hispanic DOUBLE);\nCREATE TABLE county_public_safety (County_ID BIGINT, Name VARCHAR /* e.g. 'Abbotsford', 'Burnaby' */, Population BIGINT, Police_officers BIGINT, Residents_per_officer BIGINT, Case_burden BIGINT, Crime_rate DOUBLE, Police_force VARCHAR /* e.g. 'RCMP', 'Abbotsford Police Department' */, Location VARCHAR /* e.g. 'East', 'West' */);", "question": "What are the case burdens of counties, ordered descending by population?", "sql": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02572", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the names of all modern rooms with a base price below $160 and two beds.", "sql": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02573", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the names of modern rooms that have a base price lower than $160 and two beds.", "sql": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02574", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.", "sql": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02575", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.", "sql": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02576", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02577", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Which room has the largest number of reservations?", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02578", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many kids stay in the rooms reserved by ROY SWEAZY?", "sql": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02579", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.", "sql": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02580", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many times does ROY SWEAZY has reserved a room.", "sql": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02581", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of times ROY SWEAZY has reserved a room.", "sql": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02584", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?", "sql": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02585", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.", "sql": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02586", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?", "sql": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02587", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.", "sql": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02588", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many king beds are there?", "sql": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02589", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the total number of king beds available.", "sql": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02590", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "List the names and decor of rooms that have a king bed. Sort the list by their price.", "sql": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02591", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the names and decor of rooms with a king bed? Sort them by their price", "sql": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02592", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Which room has cheapest base price? List the room's name and the base price.", "sql": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02593", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the room name and base price of the room with the lowest base price?", "sql": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02594", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the decor of room Recluse and defiance?", "sql": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02595", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Return the decor of the room named \"Recluse and defiance\".", "sql": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02596", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the average base price of different bed type? List bed type and average base price.", "sql": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02597", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "For each bed type, find the average base price of different bed type.", "sql": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02598", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the total number of people who could stay in the modern rooms in this inn?", "sql": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02599", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many people in total can stay in the modern rooms of this inn?", "sql": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02600", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What kind of decor has the least number of reservations?", "sql": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02601", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the least popular kind of decor?", "sql": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02602", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.", "sql": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02603", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?", "sql": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02604", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the first and last names of people who payed more than the rooms' base prices.", "sql": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02605", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the first and last names of people who payed more than the rooms' base prices?", "sql": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02606", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many rooms are there?", "sql": "SELECT COUNT(*) FROM Rooms;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02607", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the total number of rooms available in this inn?", "sql": "SELECT COUNT(*) FROM Rooms;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02608", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of rooms with a king bed.", "sql": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02609", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many rooms have a king bed?", "sql": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02610", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of rooms for each bed type.", "sql": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02611", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the number of rooms for each bed type?", "sql": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02612", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the name of the room with the maximum occupancy.", "sql": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02613", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the name of the room that can accommodate the most people?", "sql": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02614", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the id and name of the most expensive base price room.", "sql": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02615", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Which room has the highest base price?", "sql": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02616", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "List the type of bed and name of all traditional rooms.", "sql": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02617", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the bed type and name of all the rooms with traditional decor?", "sql": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02618", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of rooms with king bed for each decor type.", "sql": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02619", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many rooms have king beds? Report the number for each decor type.", "sql": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02620", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the average and minimum price of the rooms in different decor.", "sql": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02621", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the average minimum and price of the rooms for each different decor.", "sql": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02622", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "List the name of all rooms sorted by their prices.", "sql": "SELECT roomName FROM Rooms ORDER BY basePrice;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02623", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Sort all the rooms according to the price. Just report the room names.", "sql": "SELECT roomName FROM Rooms ORDER BY basePrice;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02624", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of rooms with price higher than 120 for different decor.", "sql": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02625", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many rooms cost more than 120, for each different decor?", "sql": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02626", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "For each bed type, find the average room price.", "sql": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02627", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What is the average base price of rooms, for each bed type?", "sql": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02628", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "List the name of rooms with king or queen bed.", "sql": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02629", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the names of rooms that have either king or queen bed?", "sql": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02630", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many different types of beds are there?", "sql": "SELECT COUNT(DISTINCT bedType) FROM Rooms;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02631", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of distinct bed types available in this inn.", "sql": "SELECT COUNT(DISTINCT bedType) FROM Rooms;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02634", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the name of rooms whose price is higher than the average price.", "sql": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02635", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the name of rooms that cost more than the average.", "sql": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02636", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the number of rooms that do not have any reservation.", "sql": "SELECT COUNT(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02637", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "How many rooms have not had any reservation yet?", "sql": "SELECT COUNT(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02638", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Return the name and number of reservations made for each of the rooms.", "sql": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02639", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "For each room, find its name and the number of times reservations were made for it.", "sql": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02640", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the names of rooms that have been reserved for more than 60 times.", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName HAVING COUNT(*) > 60;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02641", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the names of rooms whose reservation frequency exceeds 60 times?", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room, T2.roomName HAVING COUNT(*) > 60;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02642", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the name of rooms whose base price is between 120 and 150.", "sql": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02643", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Which rooms cost between 120 and 150? Give me the room names.", "sql": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02644", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "Find the name of rooms booked by some customers whose first name contains ROY.", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname ILIKE '%ROY%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02645", "db_id": "inn_1", "schema_text": "CREATE TABLE Reservations (Code BIGINT, Room VARCHAR /* e.g. 'CAS', 'FNA' */, CheckIn VARCHAR, CheckOut VARCHAR, Rate DOUBLE, LastName VARCHAR, FirstName VARCHAR, Adults BIGINT, Kids BIGINT);\nCREATE TABLE Rooms (RoomId VARCHAR /* e.g. 'AOB', 'CAS' */, roomName VARCHAR /* e.g. 'Abscond or bolster', 'Convoke and sanguine' */, beds BIGINT, bedType VARCHAR /* e.g. 'King', 'Queen' */, maxOccupancy BIGINT, basePrice BIGINT, decor VARCHAR /* e.g. 'modern', 'traditional' */);", "question": "What are the name of rooms booked by customers whose first name has \"ROY\" in part?", "sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname ILIKE '%ROY%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02646", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "what are the details of the cmi masters that have the cross reference code 'Tax'?", "sql": "SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02647", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.", "sql": "SELECT T1.cmi_cross_ref_id, T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id, T1.source_system_code HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02648", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n", "sql": "SELECT T2.cmi_cross_ref_id, T2.master_customer_id, COUNT(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id, T2.master_customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02649", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.", "sql": "SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02650", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?", "sql": "SELECT T1.source_system_code, T1.master_customer_id, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02651", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?", "sql": "SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details <> 'Schmidt , Kertzmann and Lubowitz';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02652", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?", "sql": "SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02653", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "How many different source system code for the cmi cross references are there?", "sql": "SELECT COUNT(DISTINCT source_system_code) FROM CMI_cross_references;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02654", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "List all information about customer master index, and sort them by details in descending order.", "sql": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02655", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "List the council tax ids and their related cmi cross references of all the parking fines.", "sql": "SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02656", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "How many council taxes are collected for renting arrears ?", "sql": "SELECT COUNT(*) FROM rent_arrears;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02657", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?", "sql": "SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02658", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "Which cmi cross reference id is not related to any parking taxes?", "sql": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02659", "db_id": "local_govt_mdm", "schema_text": "CREATE TABLE Benefits_Overpayments (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Business_Rates (business_rates_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE CMI_Cross_References (cmi_cross_ref_id BIGINT, master_customer_id BIGINT, source_system_code VARCHAR /* e.g. 'Tax', 'Benefits' */);\nCREATE TABLE Council_Tax (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Customer_Master_Index (master_customer_id BIGINT, cmi_details VARCHAR /* e.g. 'Gottlieb, Becker and Wyman', 'Gusikowski PLC' */);\nCREATE TABLE Electoral_Register (electoral_register_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Parking_Fines (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);\nCREATE TABLE Rent_Arrears (council_tax_id BIGINT, cmi_cross_ref_id BIGINT);", "question": "Which distinct source system code includes the substring 'en'?", "sql": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code ILIKE '%en%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02660", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "How many parties are there?", "sql": "SELECT COUNT(*) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02661", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Count the number of parties.", "sql": "SELECT COUNT(*) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02662", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "List the themes of parties in ascending order of number of hosts.", "sql": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02663", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What are the themes of parties ordered by the number of hosts in ascending manner?", "sql": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02664", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What are the themes and locations of parties?", "sql": "SELECT Party_Theme, LOCATION FROM party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02665", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Give me the theme and location of each party.", "sql": "SELECT Party_Theme, LOCATION FROM party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02666", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\".", "sql": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02667", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?", "sql": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02668", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What is the average number of hosts for parties?", "sql": "SELECT AVG(Number_of_hosts) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02669", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Compute the average number of hosts for parties.", "sql": "SELECT AVG(Number_of_hosts) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02670", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What is the location of the party with the most hosts?", "sql": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02671", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Which party had the most hosts? Give me the party location.", "sql": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02672", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show different nationalities along with the number of hosts of each nationality.", "sql": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02673", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "How many hosts does each nationality have? List the nationality and the count.", "sql": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02674", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the most common nationality of hosts.", "sql": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02675", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Which nationality has the most hosts?", "sql": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02676", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the nations that have both hosts older than 45 and hosts younger than 35.", "sql": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02677", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Which nations have both hosts of age above 45 and hosts of age below 35?", "sql": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02678", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the themes of parties and the names of the party hosts.", "sql": "SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02679", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "For each party, return its theme and the name of its host.", "sql": "SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02680", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.", "sql": "SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02681", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.", "sql": "SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02682", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the locations of parties with hosts older than 50.", "sql": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02683", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Which parties have hosts of age above 50? Give me the party locations.", "sql": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02684", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the host names for parties with number of hosts greater than 20.", "sql": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02685", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Which parties have more than 20 hosts? Give me the host names for these parties.", "sql": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02686", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the name and the nationality of the oldest host.", "sql": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02687", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What are the name and the nationality of the host of the highest age?", "sql": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02688", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "List the names of hosts who did not serve as a host of any party in our record.", "sql": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02689", "db_id": "party_host", "schema_text": "CREATE TABLE host (Host_ID BIGINT, Name VARCHAR /* e.g. 'Antonio Davis', 'Austin Daye' */, Nationality VARCHAR /* e.g. 'United States', 'Argentina' */, Age BIGINT);\nCREATE TABLE party (Party_ID BIGINT, Party_Theme VARCHAR /* e.g. 'Club Q-BASE', 'Hardcore Resurrection' */, Location VARCHAR /* e.g. 'Heineken Music Hall Amsterdam', 'Hemkade 48 Zaandam' */, First_year BIGINT, Last_year BIGINT, Number_of_hosts BIGINT);\nCREATE TABLE party_host (Party_ID BIGINT, Host_ID BIGINT, Is_Main_in_Charge VARCHAR /* e.g. 'T', 'F' */);", "question": "What are the names of hosts who did not host any party in our record?", "sql": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02690", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "How many regions do we have?", "sql": "SELECT COUNT(*) FROM region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02691", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Count the number of regions.", "sql": "SELECT COUNT(*) FROM region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02692", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show all region code and region name sorted by the codes.", "sql": "SELECT region_code, region_name FROM region ORDER BY region_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02693", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the codes and names for all regions, sorted by codes?", "sql": "SELECT region_code, region_name FROM region ORDER BY region_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02694", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "List all region names in alphabetical order.", "sql": "SELECT region_name FROM region ORDER BY region_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02695", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of the regions in alphabetical order?", "sql": "SELECT region_name FROM region ORDER BY region_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02696", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show names for all regions except for Denmark.", "sql": "SELECT region_name FROM region WHERE region_name <> 'Denmark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02697", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Return the names of all regions other than Denmark.", "sql": "SELECT region_name FROM region WHERE region_name <> 'Denmark';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02698", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "How many storms had death records?", "sql": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02699", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Count the number of storms in which at least 1 person died.", "sql": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02700", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "List name, dates active, and number of deaths for all storms with at least 1 death.", "sql": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02701", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names, dates active, and number of deaths for storms that had 1 or more death?", "sql": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02702", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show the average and maximum damage for all storms with max speed higher than 1000.", "sql": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02703", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What is the average and maximum damage in millions for storms that had a max speed over 1000?", "sql": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02704", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What is the total number of deaths and damage for all storms with a max speed greater than the average?", "sql": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02705", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.", "sql": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02706", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "List name and damage for all storms in a descending order of max speed.", "sql": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02707", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names and damage in millions for storms, ordered by their max speeds descending?", "sql": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02708", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "How many regions are affected?", "sql": "SELECT COUNT(DISTINCT region_id) FROM affected_region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02709", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Count the number of different affected regions.", "sql": "SELECT COUNT(DISTINCT region_id) FROM affected_region;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02710", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show the name for regions not affected.", "sql": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02711", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of regions that were not affected?", "sql": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02712", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show the name for regions and the number of storms for each region.", "sql": "SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id, T1.region_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02713", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "How many storms occured in each region?", "sql": "SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id, T1.region_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02714", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "List the name for storms and the number of affected regions for each storm.", "sql": "SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02715", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "How many regions were affected by each storm?", "sql": "SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02716", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What is the storm name and max speed which affected the greatest number of regions?", "sql": "SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name, T1.max_speed ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02718", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show the name of storms which don't have affected region in record.", "sql": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02719", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of storms that did not affect any regions?", "sql": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02720", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show storm name with at least two regions and 10 cities affected.", "sql": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING SUM(T2.number_city_affected) >= 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02721", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?", "sql": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING SUM(T2.number_city_affected) >= 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02722", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show all storm names except for those with at least two affected regions.", "sql": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02723", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of storms that did not affect two or more regions?", "sql": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id, T1.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02724", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the region names affected by the storm with a number of deaths of least 10?", "sql": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02725", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Return the names of the regions affected by storms that had a death count of at least 10.", "sql": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02726", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show all storm names affecting region \"Denmark\".", "sql": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02727", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of the storms that affected Denmark?", "sql": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02728", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Show the region name with at least two storms.", "sql": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id, T1.region_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02729", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of regions with two or more storms?", "sql": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id, T1.region_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02730", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Find the names of the regions which were affected by the storm that killed the greatest number of people.", "sql": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02731", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of regions that were affected by the storm in which the most people died?", "sql": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02732", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "Find the name of the storm that affected both Afghanistan and Albania regions.", "sql": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02733", "db_id": "storm_record", "schema_text": "CREATE TABLE affected_region (Region_id BIGINT, Storm_ID BIGINT, Number_city_affected DOUBLE);\nCREATE TABLE region (Region_id BIGINT, Region_code VARCHAR /* e.g. 'AD', 'AF' */, Region_name VARCHAR /* e.g. 'Afghanistan', 'Albania' */);\nCREATE TABLE storm (Storm_ID BIGINT, Name VARCHAR /* e.g. '9 cyclones', 'Eight' */, Dates_active VARCHAR /* e.g. 'August26–September2', 'August3–August10' */, Max_speed BIGINT, Damage_millions_USD DOUBLE, Number_Deaths BIGINT);", "question": "What are the names of the storms that affected both the regions of Afghanistan and Albania?", "sql": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02734", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "How many counties are there in total?", "sql": "SELECT COUNT(*) FROM county;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02735", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Count the total number of counties.", "sql": "SELECT COUNT(*) FROM county;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02736", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the county name and population of all counties.", "sql": "SELECT County_name, Population FROM county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02737", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the name and population of each county?", "sql": "SELECT County_name, Population FROM county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02738", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the average population of all counties.", "sql": "SELECT AVG(Population) FROM county;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02739", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "On average how large is the population of the counties?", "sql": "SELECT AVG(Population) FROM county;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02740", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Return the maximum and minimum population among all counties.", "sql": "SELECT MAX(Population), MIN(Population) FROM county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02741", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the maximum and minimum population of the counties?", "sql": "SELECT MAX(Population), MIN(Population) FROM county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02742", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show all the distinct districts for elections.", "sql": "SELECT DISTINCT District FROM election;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02743", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the distinct districts for elections?", "sql": "SELECT DISTINCT District FROM election;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02744", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the zip code of the county with name \"Howard\".", "sql": "SELECT Zip_code FROM county WHERE County_name = 'Howard';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02745", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What is the zip code the county named \"Howard\" is located in?", "sql": "SELECT Zip_code FROM county WHERE County_name = 'Howard';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02746", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the delegate from district 1 in election.", "sql": "SELECT Delegate FROM election WHERE District = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02747", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Who is the delegate of district 1 in the elections?", "sql": "SELECT Delegate FROM election WHERE District = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02748", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the delegate and committee information of elections.", "sql": "SELECT Delegate, Committee FROM election;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02749", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the delegate and committee information for each election record?", "sql": "SELECT Delegate, Committee FROM election;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02750", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "How many distinct governors are there?", "sql": "SELECT COUNT(DISTINCT Governor) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02751", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Count the number of distinct governors.", "sql": "SELECT COUNT(DISTINCT Governor) FROM party;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02752", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the lieutenant governor and comptroller from the democratic party.", "sql": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02753", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Who are the lieutenant governor and comptroller from the democratic party?", "sql": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02754", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "In which distinct years was the governor \"Eliot Spitzer\"?", "sql": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02755", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Find the distinct years when the governor was named \"Eliot Spitzer\".", "sql": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02756", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show all the information about election.", "sql": "SELECT * FROM election;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02757", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Return all the information for each election record.", "sql": "SELECT * FROM election;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02758", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the delegates and the names of county they belong to.", "sql": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02759", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the delegate and name of the county they belong to, for each county?", "sql": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02760", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which delegates are from counties with population smaller than 100000?", "sql": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02761", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Find the delegates who are from counties with population below 100000.", "sql": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02762", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "How many distinct delegates are from counties with population larger than 50000?", "sql": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02763", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Count the number of distinct delegates who are from counties with population above 50000.", "sql": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02764", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?", "sql": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02765", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.", "sql": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02766", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the delegates and the names of the party they belong to.", "sql": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02767", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "For each delegate, find the names of the party they are part of.", "sql": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02768", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Who were the governors of the parties associated with delegates from district 1?", "sql": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02769", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?", "sql": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02770", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?", "sql": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02771", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?", "sql": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02772", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Return all the committees that have delegates from Democratic party.", "sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02773", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which committees have delegates from the Democratic party?", "sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02774", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the name of each county along with the corresponding number of delegates from that county.", "sql": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id, T1.County_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02775", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "For each county, find the name of the county and the number of delegates from that county.", "sql": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id, T1.County_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02776", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the name of each party and the corresponding number of delegates from that party.", "sql": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party, T2.Party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02777", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "For each party, return the name of the party and the number of delegates from that party.", "sql": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party, T2.Party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02778", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Return the names of all counties sorted by population in ascending order.", "sql": "SELECT County_name FROM county ORDER BY Population ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02779", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Sort the names of all counties in ascending order of population.", "sql": "SELECT County_name FROM county ORDER BY Population ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02780", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Return the names of all counties sorted by county name in descending alphabetical order.", "sql": "SELECT County_name FROM county ORDER BY County_name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02781", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Sort the names of all counties in descending alphabetical order.", "sql": "SELECT County_name FROM county ORDER BY County_name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02782", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the name of the county with the biggest population.", "sql": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02783", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which county has the largest population? Give me the name of the county.", "sql": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02784", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the 3 counties with the smallest population.", "sql": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02785", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the 3 counties that have the smallest population? Give me the county names.", "sql": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02786", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the names of counties that have at least two delegates.", "sql": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id, T1.County_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02787", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which counties have two or more delegates? Give me the county names.", "sql": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id, T1.County_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02788", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the name of the party that has at least two records.", "sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02789", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which party has two or more records?", "sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02790", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the name of the party that has the most delegates.", "sql": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party, T2.Party ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02791", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which party has the largest number of delegates?", "sql": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party, T2.Party ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02792", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the people that have been governor the most times.", "sql": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02793", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which people severed as governor most frequently?", "sql": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02794", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Show the people that have been comptroller the most times and the corresponding number of times.", "sql": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02795", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.", "sql": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02796", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the names of parties that do not have delegates in election?", "sql": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02797", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which parties did not have any delegates in elections?", "sql": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02798", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "What are the names of parties that have both delegates on \"Appropriations\" committee and", "sql": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02799", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee?", "sql": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02800", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Which committees have delegates from both democratic party and liberal party?", "sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02801", "db_id": "election", "schema_text": "CREATE TABLE county (County_Id BIGINT, County_name VARCHAR /* e.g. 'Baltimore County', 'Colony' */, Population DOUBLE, Zip_code VARCHAR /* e.g. 'D02', 'D08' */);\nCREATE TABLE election (Election_ID BIGINT, Counties_Represented VARCHAR /* e.g. '13', '09.1 9A' */, District BIGINT, Delegate VARCHAR /* e.g. 'Bates, Gail H. Gail H. Bates', 'Bobo, Elizabeth Elizabeth Bobo' */, Party BIGINT, First_Elected DOUBLE, Committee VARCHAR /* e.g. 'Appropriations', 'Economic Matters' */);\nCREATE TABLE party (Party_ID BIGINT, Year DOUBLE, Party VARCHAR /* e.g. 'Democratic', 'Independence' */, Governor VARCHAR /* e.g. 'Eliot Spitzer', 'Betsy McCaughey Ross' */, Lieutenant_Governor VARCHAR /* e.g. 'David Paterson', 'Dennis Mehiel' */, Comptroller VARCHAR /* e.g. 'Alan Hevesi', 'Carl McCall' */, Attorney_General VARCHAR /* e.g. 'Eliot Spitzer', 'Andrew Cuomo' */, US_Senate VARCHAR /* e.g. 'Hillary Rodham Clinton', '(no election)' */);", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02820", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Show me all the restaurants.", "sql": "SELECT ResName FROM Restaurant;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02821", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "What is the address of the restaurant Subway?", "sql": "SELECT Address FROM Restaurant WHERE ResName = 'Subway';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02822", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "What is the rating of the restaurant Subway?", "sql": "SELECT Rating FROM Restaurant WHERE ResName = 'Subway';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02823", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "List all restaurant types.", "sql": "SELECT ResTypeName FROM Restaurant_Type;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02824", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "What is the description of the restaurant type Sandwich?", "sql": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02825", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which restaurants have highest rating? List the restaurant name and its rating.", "sql": "SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02826", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "What is the age of student Linda Smith?", "sql": "SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02827", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "What is the gender of the student Linda Smith?", "sql": "SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02828", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "List all students' first names and last names who majored in 600.", "sql": "SELECT Fname, Lname FROM Student WHERE Major = 600;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02829", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which city does student Linda Smith live in?", "sql": "SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02830", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Advisor 1121 has how many students?", "sql": "SELECT COUNT(*) FROM Student WHERE Advisor = 1121;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02831", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which Advisor has most of students? List advisor and the number of students.", "sql": "SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02832", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which major has least number of students? List the major and the number of students.", "sql": "SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02833", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which major has between 2 and 30 number of students? List major and the number of students.", "sql": "SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02834", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.", "sql": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02835", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.", "sql": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02836", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "How many restaurant is the Sandwich type restaurant?", "sql": "SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID, Restaurant_Type.ResTypeName HAVING Restaurant_Type.ResTypeName = 'Sandwich';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02837", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "How long does student Linda Smith spend on the restaurant in total?", "sql": "SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02838", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "How many times has the student Linda Smith visited Subway?", "sql": "SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02839", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "When did Linda Smith visit Subway?", "sql": "SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02840", "db_id": "restaurant_1", "schema_text": "CREATE TABLE Restaurant (ResID BIGINT, ResName VARCHAR /* e.g. 'Honeygrow', 'Subway' */, Address VARCHAR /* e.g. '3212 St Paul St, Baltimore, MD 21218', '3233 St Paul St, Baltimore, MD 21218' */, Rating BIGINT);\nCREATE TABLE Restaurant_Type (ResTypeID BIGINT, ResTypeName VARCHAR /* e.g. 'Sandwich', 'Stir-fry' */, ResTypeDescription VARCHAR /* e.g. 'Classic Chinese cooking.', 'Simplest there is.' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Type_Of_Restaurant (ResID BIGINT, ResTypeID BIGINT);\nCREATE TABLE Visits_Restaurant (StuID BIGINT, ResID BIGINT, Time TIMESTAMP, Spent DOUBLE);", "question": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", "sql": "SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID, Restaurant.ResName ORDER BY SUM(Visits_Restaurant.Spent) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02842", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the ids of orders whose status is 'Success'.", "sql": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02843", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "sql": "SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id, t1.product_name, t1.product_price ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02844", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the number of customers in total.", "sql": "SELECT COUNT(*) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02845", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "How many different payment methods are there?", "sql": "SELECT COUNT(DISTINCT payment_method) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02846", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Show the details of all trucks in the order of their license number.", "sql": "SELECT truck_details FROM trucks ORDER BY truck_licence_number;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02847", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the name of the most expensive product.", "sql": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02848", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the names of customers who are not living in the state of California.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02849", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "List the names and emails of customers who payed by Visa card.", "sql": "SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02850", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the names and phone numbers of customers living in California state.", "sql": "SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02851", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the states which do not have any employee in their record.", "sql": "SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02852", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.", "sql": "SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02853", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the name of the first 5 customers.", "sql": "SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02854", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "Find the payment method that is used most frequently.", "sql": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02855", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "List the names of all routes in alphabetic order.", "sql": "SELECT route_name FROM Delivery_Routes ORDER BY route_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02857", "db_id": "customer_deliveries", "schema_text": "CREATE TABLE Actual_Order_Products (actual_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Actual_Orders (actual_order_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancel', 'Success' */, regular_order_id BIGINT, actual_order_date TIMESTAMP);\nCREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR /* e.g. '045 Marquardt Village Suite 484', '06959 Garett Meadows Apt. 259' */, city VARCHAR /* e.g. 'Alvertatown', 'Annietown' */, zip_postcode VARCHAR /* e.g. '940', '003' */, state_province_county VARCHAR /* e.g. 'Illinois', 'Michigan' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, address_type VARCHAR /* e.g. 'House', 'Flat' */, date_to TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Visa', 'Discover' */, customer_name VARCHAR /* e.g. 'Amalia Hudson DDS', 'Annabell Walsh' */, customer_phone VARCHAR /* e.g. '(881)096-1281x6448', '+49(2)0677806107' */, customer_email VARCHAR /* e.g. 'adriana83@example.org', 'alexandra91@example.net' */, date_became_customer TIMESTAMP);\nCREATE TABLE Delivery_Route_Locations (location_code VARCHAR /* e.g. '04 Elm Rd', '15 Sixth Av' */, route_id BIGINT, location_address_id BIGINT, location_name VARCHAR /* e.g. 'Bartoletti, Keebler and Crona', 'Bradtke-Herman' */);\nCREATE TABLE Delivery_Routes (route_id BIGINT, route_name VARCHAR /* e.g. 'Abshire Ltd', 'Adams, Macejkovic and Carroll' */, other_route_details VARCHAR);\nCREATE TABLE Employees (employee_id BIGINT, employee_address_id BIGINT, employee_name VARCHAR /* e.g. 'Allison', 'Anthony' */, employee_phone VARCHAR /* e.g. '(539)655-7194x3276', '+28(9)6180779782' */);\nCREATE TABLE Order_Deliveries (location_code VARCHAR /* e.g. '34 Benz St', '58 Roof Av' */, actual_order_id BIGINT, delivery_status_code VARCHAR /* e.g. 'Ready', 'Delivered' */, driver_employee_id BIGINT, truck_id BIGINT, delivery_date TIMESTAMP);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'books', 'cloth' */, product_price DOUBLE, product_description VARCHAR /* e.g. 'good condition', 'bad condition' */);\nCREATE TABLE Regular_Order_Products (regular_order_id BIGINT, product_id BIGINT);\nCREATE TABLE Regular_Orders (regular_order_id BIGINT, distributer_id BIGINT);\nCREATE TABLE Trucks (truck_id BIGINT, truck_licence_number BIGINT, truck_details VARCHAR /* e.g. 'Bud', 'Deon' */);", "question": "List the state names and the number of customers living in each state.", "sql": "SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02858", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many authors are there?", "sql": "SELECT COUNT(*) FROM authors;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02859", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Count the number of authors.", "sql": "SELECT COUNT(*) FROM authors;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02860", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many institutions are there?", "sql": "SELECT COUNT(*) FROM inst;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02861", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Count the number of institutions.", "sql": "SELECT COUNT(*) FROM inst;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02862", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many papers are published in total?", "sql": "SELECT COUNT(*) FROM papers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02863", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Count the number of total papers.", "sql": "SELECT COUNT(*) FROM papers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02864", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What are the titles of papers published by \"Jeremy Gibbons\"?", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02865", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the titles of all the papers written by \"Jeremy Gibbons\"", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02866", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find all the papers published by \"Aaron Turon\".", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02867", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the titles of all the papers written by \"Aaron Turon\".", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02868", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many papers have \"Atsushi Ohori\" published?", "sql": "SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02869", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many papers are \"Atsushi Ohori\" the author of?", "sql": "SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02870", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What is the name of the institution that \"Matthias Blume\" belongs to?", "sql": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02871", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution.", "sql": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02872", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which institution does \"Katsuhiro Ueno\" belong to?", "sql": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02873", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?", "sql": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02874", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Who belong to the institution \"University of Oxford\"? Show the first names and last names.", "sql": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02875", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\".", "sql": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02876", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which authors belong to the institution \"Google\"? Show the first names and last names.", "sql": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02877", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the first names and last names of the authors whose institution affiliation is \"Google\".", "sql": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02878", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What are the last names of the author of the paper titled \"Binders Unbound\"?", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02879", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02880", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\".", "sql": "SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02881", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What are the first and last name of the author who published the paper titled \"Nameless, Painless\"?", "sql": "SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02882", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What are the papers published under the institution \"Indiana University\"?", "sql": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02883", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "List the titles of the papers whose authors are from the institution \"Indiana University\".", "sql": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02884", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find all the papers published by the institution \"Google\".", "sql": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02885", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers were written by authors from the institution \"Google\"?", "sql": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02886", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many papers are published by the institution \"Tokohu University\"?", "sql": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02887", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the number of papers published by authors from the institution \"Tokohu University\".", "sql": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02888", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the number of papers published by the institution \"University of Pennsylvania\".", "sql": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02889", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "How many papers are written by authors from the institution \"University of Pennsylvania\"?", "sql": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02890", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the papers which have \"Olin Shivers\" as an author.", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02891", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers did the author \"Olin Shivers\" write? Give me the paper titles.", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02892", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers have \"Stephanie Weirich\" as an author?", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02893", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the titles of the papers the author \"Stephanie Weirich\" wrote.", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02894", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02895", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\".", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02896", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02897", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers' first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? Give me the titles of the papers.", "sql": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02898", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What is the last name of the author that has published the most papers?", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02899", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which author has written the most papers? Find his or her last name.", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02900", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Retrieve the country that has published the most papers.", "sql": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02901", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the country that the most papers are affiliated with.", "sql": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02902", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the name of the organization that has published the largest number of papers.", "sql": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02903", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which institution has the most papers? Find the name of the institution.", "sql": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02904", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the titles of the papers that contain the word \"ML\".", "sql": "SELECT title FROM papers WHERE title ILIKE '%ML%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02905", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers have the substring \"ML\" in their titles? Return the titles of the papers.", "sql": "SELECT title FROM papers WHERE title ILIKE '%ML%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02906", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which paper's title contains the word \"Database\"?", "sql": "SELECT title FROM papers WHERE title ILIKE '%Database%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02907", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which papers have the substring \"Database\" in their titles? Show the titles of the papers.", "sql": "SELECT title FROM papers WHERE title ILIKE '%Database%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02908", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\".", "sql": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title ILIKE '%Functional%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02909", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors.", "sql": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title ILIKE '%Functional%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02910", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title ILIKE '%Monadic%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02911", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which authors have written a paper with title containing the word \"Monadic\"? Return their last names.", "sql": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title ILIKE '%Monadic%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02912", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Retrieve the title of the paper that has the largest number of authors.", "sql": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02913", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which paper has the most authors? Give me the paper title.", "sql": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02914", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "What is the first name of the author with last name \"Ueno\"?", "sql": "SELECT fname FROM authors WHERE lname = 'Ueno';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02915", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which authors have last name \"Ueno\"? List their first names.", "sql": "SELECT fname FROM authors WHERE lname = 'Ueno';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02916", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the last name of the author with first name \"Amal\".", "sql": "SELECT lname FROM authors WHERE fname = 'Amal';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02917", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Which authors have first name \"Amal\"? List their last names.", "sql": "SELECT lname FROM authors WHERE fname = 'Amal';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02918", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Find the first names of all the authors ordered in alphabetical order.", "sql": "SELECT fname FROM authors ORDER BY fname;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02919", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Sort the first names of all the authors in alphabetical order.", "sql": "SELECT fname FROM authors ORDER BY fname;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02920", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Retrieve all the last names of authors in alphabetical order.", "sql": "SELECT lname FROM authors ORDER BY lname;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02921", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Give me a list of all the last names of authors sorted in alphabetical order", "sql": "SELECT lname FROM authors ORDER BY lname;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02922", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Retrieve all the first and last names of authors in the alphabetical order of last names.", "sql": "SELECT fname, lname FROM authors ORDER BY lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02923", "db_id": "icfp_1", "schema_text": "CREATE TABLE Authors (authID BIGINT, lname VARCHAR /* e.g. 'Ahmed', 'Blume' */, fname VARCHAR /* e.g. 'Aaron', 'Amal' */);\nCREATE TABLE Authorship (authID BIGINT, instID BIGINT, paperID BIGINT, authOrder BIGINT);\nCREATE TABLE Inst (instID BIGINT, name VARCHAR /* e.g. 'Google', 'INRIA' */, country VARCHAR /* e.g. 'USA', 'Japan' */);\nCREATE TABLE Papers (paperID BIGINT, title VARCHAR /* e.g. 'Binders Unbound', 'Nameless, Painless' */);", "question": "Sort the list of all the first and last names of authors in alphabetical order of the last names.", "sql": "SELECT fname, lname FROM authors ORDER BY lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02924", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many different last names do the actors and actresses have?", "sql": "SELECT COUNT(DISTINCT last_name) FROM actor;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02925", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of different last names actors have.", "sql": "SELECT COUNT(DISTINCT last_name) FROM actor;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02926", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the most popular first name of the actors?", "sql": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02927", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the most common first name among all actors.", "sql": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02928", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the most popular full name of the actors?", "sql": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02929", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the most common full name among all actors.", "sql": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02930", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which districts have at least two addresses?", "sql": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02931", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Give the districts which have two or more addresses.", "sql": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02932", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?", "sql": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02933", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.", "sql": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02936", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many addresses are in the district of California?", "sql": "SELECT COUNT(*) FROM address WHERE district = 'California';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02937", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of addressed in the California district.", "sql": "SELECT COUNT(*) FROM address WHERE district = 'California';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02938", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.", "sql": "SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id, T1.title HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02939", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?", "sql": "SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id, T1.title HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02940", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many cities are in Australia?", "sql": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02941", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of cities in Australia.", "sql": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02942", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which countries have at least 3 cities?", "sql": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id, T2.country HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02943", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the countries that contain 3 or more cities?", "sql": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id, T2.country HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02944", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02945", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?", "sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02946", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many customers have an active value of 1?", "sql": "SELECT COUNT(*) FROM customer WHERE active = '1';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02947", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of customers who are active.", "sql": "SELECT COUNT(*) FROM customer WHERE active = '1';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02948", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which film has the highest rental rate? And what is the rate?", "sql": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02949", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the title and rental rate of the film with the highest rental rate?", "sql": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02950", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which film has the most number of actors or actresses? List the film name, film id and description.", "sql": "SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id, T2.title, T2.description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02951", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the title, id, and description of the movie with the greatest number of actors?", "sql": "SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id, T2.title, T2.description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02952", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.", "sql": "SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id, T2.first_name, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02953", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the full name and id of the actor or actress who starred in the greatest number of films.", "sql": "SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id, T2.first_name, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02954", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.", "sql": "SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id, T2.first_name, T2.last_name HAVING COUNT(*) > 30;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02955", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the full names of actors who had roles in more than 30 films?", "sql": "SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id, T2.first_name, T2.last_name HAVING COUNT(*) > 30;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02956", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which store owns most items?", "sql": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02957", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the id of the store that has the most items in inventory?", "sql": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02958", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the total amount of all payments?", "sql": "SELECT SUM(amount) FROM payment;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02959", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the sum of all payment amounts.", "sql": "SELECT SUM(amount) FROM payment;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02960", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.", "sql": "SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T1.first_name, T1.last_name ORDER BY SUM(amount) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02961", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the full name and id of the customer who has the lowest total amount of payment?", "sql": "SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T1.first_name, T1.last_name ORDER BY SUM(amount) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02962", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the genre name of the film HUNGER ROOF?", "sql": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02963", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the name of the category to which the film 'HUNGER ROOF' belongs.", "sql": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02964", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many films are there in each category? List the genre name, genre id and the count.", "sql": "SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02965", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the names and ids of the different categories, and how many films are in each?", "sql": "SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02970", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many languages are in these films?", "sql": "SELECT COUNT(DISTINCT language_id) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02971", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of different languages in these films.", "sql": "SELECT COUNT(DISTINCT language_id) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02972", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are all the movies rated as R? List the titles.", "sql": "SELECT title FROM film WHERE rating = 'R';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02973", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the titles of any movies with an R rating.", "sql": "SELECT title FROM film WHERE rating = 'R';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02974", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Where is store 1 located?", "sql": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02975", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the address of store 1.", "sql": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02976", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which staff handled least number of payments? List the full name and the id.", "sql": "SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id, T1.first_name, T1.last_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02977", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Give the full name and staff id of the staff who has handled the fewest payments.", "sql": "SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id, T1.first_name, T1.last_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02978", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which language does the film AIRPORT POLLOCK use? List the language name.", "sql": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02979", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?", "sql": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02980", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many stores are there?", "sql": "SELECT COUNT(*) FROM store;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02981", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of stores.", "sql": "SELECT COUNT(*) FROM store;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02982", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many kinds of different ratings are listed?", "sql": "SELECT COUNT(DISTINCT rating) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02983", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of different film ratings.", "sql": "SELECT COUNT(DISTINCT rating) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02986", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "How many items in inventory does store 1 have?", "sql": "SELECT COUNT(*) FROM inventory WHERE store_id = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02987", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Count the number of items store 1 has in stock.", "sql": "SELECT COUNT(*) FROM inventory WHERE store_id = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_02988", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "When did the first payment happen?", "sql": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02989", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What was the date of the earliest payment?", "sql": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02990", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Where does the customer with the first name Linda live? And what is her email?", "sql": "SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02991", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the address and email of the customer with the first name Linda.", "sql": "SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_02992", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.", "sql": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02993", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?", "sql": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_02994", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the first name and the last name of the customer who made the earliest rental?", "sql": "SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02995", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the full name of the customer who made the first rental.", "sql": "SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02996", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?", "sql": "SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02997", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.", "sql": "SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02998", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Which store has most the customers?", "sql": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_02999", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the id of the store with the most customers.", "sql": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03000", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What is the largest payment amount?", "sql": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03001", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the amount of the largest payment.", "sql": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03002", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Where does the staff member with the first name Elsa live?", "sql": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03003", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Give the address of the staff member who has the first name Elsa.", "sql": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03004", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?", "sql": "SELECT first_name FROM customer WHERE customer_id NOT IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03005", "db_id": "sakila_1", "schema_text": "CREATE TABLE actor (actor_id BIGINT, first_name VARCHAR, last_name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE address (address_id BIGINT, address VARCHAR, address2 VARCHAR, district VARCHAR, city_id BIGINT, postal_code VARCHAR, phone VARCHAR, last_update TIMESTAMP);\nCREATE TABLE category (category_id BIGINT, name VARCHAR /* e.g. 'Action', 'Animation' */, last_update TIMESTAMP);\nCREATE TABLE city (city_id BIGINT, city VARCHAR, country_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE country (country_id BIGINT, country VARCHAR, last_update TIMESTAMP);\nCREATE TABLE customer (customer_id BIGINT, store_id BIGINT, first_name VARCHAR, last_name VARCHAR, email VARCHAR, address_id BIGINT, active BIGINT, create_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE film (film_id BIGINT, title VARCHAR, description VARCHAR, release_year BIGINT, language_id BIGINT, original_language_id BIGINT, rental_duration BIGINT, rental_rate DOUBLE, length BIGINT, replacement_cost DOUBLE, rating BLOB, special_features BLOB, last_update TIMESTAMP);\nCREATE TABLE film_actor (actor_id BIGINT, film_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_category (film_id BIGINT, category_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE film_text (film_id BIGINT, title VARCHAR, description VARCHAR);\nCREATE TABLE inventory (inventory_id BIGINT, film_id BIGINT, store_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE language (language_id BIGINT, name VARCHAR, last_update TIMESTAMP);\nCREATE TABLE payment (payment_id BIGINT, customer_id BIGINT, staff_id BIGINT, rental_id BIGINT, amount DOUBLE, payment_date TIMESTAMP, last_update TIMESTAMP);\nCREATE TABLE rental (rental_id BIGINT, rental_date TIMESTAMP, inventory_id BIGINT, customer_id BIGINT, return_date TIMESTAMP, staff_id BIGINT, last_update TIMESTAMP);\nCREATE TABLE staff (staff_id BIGINT, first_name VARCHAR, last_name VARCHAR, address_id BIGINT, picture BLOB, email VARCHAR, store_id BIGINT, active BIGINT, username VARCHAR, password VARCHAR, last_update TIMESTAMP);\nCREATE TABLE store (store_id BIGINT, manager_staff_id BIGINT, address_id BIGINT, last_update TIMESTAMP);", "question": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.", "sql": "SELECT first_name FROM customer WHERE customer_id NOT IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03006", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "How many bank branches are there?", "sql": "SELECT COUNT(*) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03007", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Count the number of bank branches.", "sql": "SELECT COUNT(*) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03008", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "How many customers are there?", "sql": "SELECT SUM(no_of_customers) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03009", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the total number of customers across banks?", "sql": "SELECT SUM(no_of_customers) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03010", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the number of customers in the banks at New York City.", "sql": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03011", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the total number of customers who use banks in New York City?", "sql": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03012", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the average number of customers in all banks of Utah state.", "sql": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03013", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the average number of customers across banks in the state of Utah?", "sql": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03014", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the average number of customers cross all banks.", "sql": "SELECT AVG(no_of_customers) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03015", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the average number of bank customers?", "sql": "SELECT AVG(no_of_customers) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03016", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the city and state of the bank branch named morningside.", "sql": "SELECT city, state FROM bank WHERE bname = 'morningside';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03017", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What city and state is the bank with the name morningside in?", "sql": "SELECT city, state FROM bank WHERE bname = 'morningside';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03018", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the branch names of banks in the New York state.", "sql": "SELECT bname FROM bank WHERE state = 'New York';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03019", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of banks in the state of New York?", "sql": "SELECT bname FROM bank WHERE state = 'New York';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03020", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "List the name of all customers sorted by their account balance in ascending order.", "sql": "SELECT cust_name FROM customer ORDER BY acc_bal;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03021", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of all customers, ordered by account balance?", "sql": "SELECT cust_name FROM customer ORDER BY acc_bal;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03022", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "List the name of all different customers who have some loan sorted by their total loan amount.", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03023", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03024", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the state, account type, and credit score of the customer whose number of loan is 0.", "sql": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03025", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the states, account types, and credit scores for customers who have 0 loans?", "sql": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03026", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the number of different cities which banks are located at.", "sql": "SELECT COUNT(DISTINCT city) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03027", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "In how many different cities are banks located?", "sql": "SELECT COUNT(DISTINCT city) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03028", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the number of different states which banks are located at.", "sql": "SELECT COUNT(DISTINCT state) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03029", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "In how many different states are banks located?", "sql": "SELECT COUNT(DISTINCT state) FROM bank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03030", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "How many distinct types of accounts are there?", "sql": "SELECT COUNT(DISTINCT acc_type) FROM customer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03031", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Count the number of different account types.", "sql": "SELECT COUNT(DISTINCT acc_type) FROM customer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03032", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name and account balance of the customer whose name includes the letter ‘a’.", "sql": "SELECT cust_name, acc_bal FROM customer WHERE cust_name ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03033", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names and account balances of customers with the letter a in their names?", "sql": "SELECT cust_name, acc_bal FROM customer WHERE cust_name ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03034", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the total account balance of each customer from Utah or Texas.", "sql": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03035", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the total account balances for each customer from Utah or Texas?", "sql": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03036", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers who have both saving and checking account types.", "sql": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03037", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who have both savings and checking accounts?", "sql": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03038", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers who do not have an saving account.", "sql": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03039", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who do not have saving accounts?", "sql": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03040", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers who do not have a loan with a type of Mortgages.", "sql": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03041", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who have not taken a Mortage loan?", "sql": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03042", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers who have loans of both Mortgages and Auto.", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03043", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who have taken both Mortgage and Auto loans?", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03044", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers whose credit score is below the average credit scores of all customers.", "sql": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03045", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers with credit score less than the average credit score across customers?", "sql": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03046", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the branch name of the bank that has the most number of customers.", "sql": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03047", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name of the bank branch with the greatest number of customers?", "sql": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03048", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customer who has the lowest credit score.", "sql": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03049", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name of the customer with the worst credit score?", "sql": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03050", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name, account type, and account balance of the customer who has the highest credit score.", "sql": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03051", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?", "sql": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03052", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customer who has the highest amount of loans.", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03053", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name of the customer who has greatest total loan amount?", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03054", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the state which has the most number of customers.", "sql": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03055", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Which state has the greatest total number of bank customers?", "sql": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03056", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "For each account type, find the average account balance of customers with credit score lower than 50.", "sql": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03057", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the average account balance of customers with credit score below 50 for the different account types?", "sql": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03058", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "For each state, find the total account balance of customers whose credit score is above 100.", "sql": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03059", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the total account balance for customers with a credit score of above 100 for the different states?", "sql": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03060", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the total amount of loans offered by each bank branch.", "sql": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03061", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of the different bank branches, and what are their total loan amounts?", "sql": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03062", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of customers who have more than one loan.", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03063", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who have taken out more than one loan?", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03064", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.", "sql": "SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name, T1.acc_type HAVING SUM(T2.amount) > 5000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03065", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?", "sql": "SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name, T1.acc_type HAVING SUM(T2.amount) > 5000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03066", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of bank branch that provided the greatest total amount of loans.", "sql": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03067", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name of the bank branch that has lent the greatest amount?", "sql": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03068", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.", "sql": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03069", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?", "sql": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03070", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name of bank branches that provided some loans.", "sql": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03071", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of the different banks that have provided loans?", "sql": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03072", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the name and credit score of the customers who have some loans.", "sql": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03073", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the different names and credit scores of customers who have taken a loan?", "sql": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03074", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the the name of the customers who have a loan with amount more than 3000.", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03075", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of customers who have a loan of more than 3000 in amount?", "sql": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03076", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the city and name of bank branches that provide business loans.", "sql": "SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03077", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names and cities of bank branches that offer loans for business?", "sql": "SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03078", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.", "sql": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03079", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What are the names of banks that have loaned money to customers with credit scores below 100?", "sql": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03080", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the total amount of loans provided by bank branches in the state of New York.", "sql": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03081", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the total amount of money loaned by banks in New York state?", "sql": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03082", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the average credit score of the customers who have some loan.", "sql": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03083", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the average credit score for customers who have taken a loan?", "sql": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03084", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "Find the average credit score of the customers who do not have any loan.", "sql": "SELECT AVG(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03085", "db_id": "loan_1", "schema_text": "CREATE TABLE bank (branch_ID BIGINT, bname VARCHAR /* e.g. 'broadway', 'downtown' */, no_of_customers BIGINT, city VARCHAR /* e.g. 'New York City', 'Austin' */, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE customer (cust_ID BIGINT, cust_name VARCHAR /* e.g. 'Jack', 'Mary' */, acc_type VARCHAR /* e.g. 'saving', 'checking' */, acc_bal BIGINT, no_of_loans BIGINT, credit_score BIGINT, branch_ID BIGINT, state VARCHAR /* e.g. 'New York', 'Texas' */);\nCREATE TABLE loan (loan_ID BIGINT, loan_type VARCHAR /* e.g. 'Auto', 'Business' */, cust_ID BIGINT, branch_ID BIGINT, amount BIGINT);", "question": "What is the average credit score for customers who have never taken a loan?", "sql": "SELECT AVG(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03086", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "How many assessment notes are there in total?", "sql": "SELECT COUNT(*) FROM ASSESSMENT_NOTES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03087", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the dates of the assessment notes?", "sql": "SELECT date_of_notes FROM Assessment_Notes;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03088", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "How many addresses have zip code 197?", "sql": "SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = '197';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03089", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "How many distinct incident type codes are there?", "sql": "SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03090", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Return all distinct detention type codes.", "sql": "SELECT DISTINCT detention_type_code FROM Detention;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03091", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the start and end dates for incidents with incident type code \"NOISE\"?", "sql": "SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = 'NOISE';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03092", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Return all detention summaries.", "sql": "SELECT detention_summary FROM Detention;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03093", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Return the cell phone number and email address for all students.", "sql": "SELECT cell_mobile_number, email_address FROM STUDENTS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03094", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", "sql": "SELECT email_address FROM Students WHERE first_name = 'Emma' AND last_name = 'Rohan';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03095", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "How many distinct students have been in detention?", "sql": "SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03096", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What is the gender of the teacher with last name \"Medhurst\"?", "sql": "SELECT gender FROM TEACHERS WHERE last_name = 'Medhurst';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03097", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What is the incident type description for the incident type with code \"VIOLENCE\"?", "sql": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = 'VIOLENCE';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03098", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the maximum and minimum monthly rental for all student addresses.", "sql": "SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03099", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the first names of teachers whose email address contains the word \"man\".", "sql": "SELECT first_name FROM Teachers WHERE email_address ILIKE '%man%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03100", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "List all information about the assessment notes sorted by date in ascending order.", "sql": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03101", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "List all cities of addresses in alphabetical order.", "sql": "SELECT city FROM Addresses ORDER BY city;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03102", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the first names and last names of teachers in alphabetical order of last name.", "sql": "SELECT first_name, last_name FROM Teachers ORDER BY last_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03103", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find all information about student addresses, and sort by monthly rental in descending order.", "sql": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03104", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the id and first name of the student that has the most number of assessment notes?", "sql": "SELECT T1.student_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.first_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03106", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the id and last name of the student that has the most behavior incidents?", "sql": "SELECT T1.student_id, T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03107", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?", "sql": "SELECT T1.teacher_id, T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = 'AFTER' GROUP BY T1.teacher_id, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03108", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the id and first name of the student whose addresses have the highest average monthly rental?", "sql": "SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.first_name ORDER BY AVG(monthly_rental) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03109", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the id and city of the student address with the highest average monthly rental.", "sql": "SELECT T2.address_id, T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id, T1.city ORDER BY AVG(monthly_rental) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03111", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the code and description of the least frequent detention type ?", "sql": "SELECT T1.detention_type_code, T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code, T2.detention_type_description ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03112", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the dates of assessment notes for students with first name \"Fanny\".", "sql": "SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = 'Fanny';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03113", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the texts of assessment notes for teachers with last name \"Schuster\".", "sql": "SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schuster';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03114", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the start and end dates of behavior incidents of students with last name \"Fahey\".", "sql": "SELECT T1.date_incident_start, date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = 'Fahey';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03115", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the start and end dates of detentions of teachers with last name \"Schultz\".", "sql": "SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schultz';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03116", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the id and zip code of the address with the highest monthly rental?", "sql": "SELECT T2.address_id, T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03117", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What is the cell phone number of the student whose address has the lowest monthly rental?", "sql": "SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03118", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the monthly rentals of student addresses in Texas state?", "sql": "SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Texas';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03119", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the first names and last names of students with address in Wisconsin state?", "sql": "SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Wisconsin';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03120", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the line 1 and average monthly rentals of all student addresses?", "sql": "SELECT T1.line_1, AVG(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id, T1.line_1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03121", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What is the zip code of the address where the teacher with first name \"Lyla\" lives?", "sql": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Lyla';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03122", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the email addresses of teachers whose address has zip code \"918\"?", "sql": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = '918';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03123", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "How many students are not involved in any behavior incident?", "sql": "SELECT COUNT(*) FROM STUDENTS WHERE student_id NOT IN (SELECT student_id FROM Behavior_Incident);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03124", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "Find the last names of teachers who are not involved in any detention.", "sql": "SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03125", "db_id": "behavior_monitoring", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1 VARCHAR /* e.g. '014 Runte Haven Apt. 870', '020 Orie Canyon' */, line_2 VARCHAR, line_3 VARCHAR, city VARCHAR /* e.g. 'Beierview', 'Caitlynstad' */, zip_postcode VARCHAR /* e.g. '002', '062' */, state_province_county VARCHAR /* e.g. 'Wisconsin', 'Illinois' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Assessment_Notes (notes_id BIGINT, student_id BIGINT, teacher_id BIGINT, date_of_notes TIMESTAMP, text_of_notes VARCHAR, other_details VARCHAR);\nCREATE TABLE Behavior_Incident (incident_id BIGINT, incident_type_code VARCHAR /* e.g. 'NOISE', 'VIOLENCE' */, student_id BIGINT, date_incident_start TIMESTAMP, date_incident_end TIMESTAMP, incident_summary VARCHAR, recommendations VARCHAR /* e.g. 'Transfer schools' */, other_details VARCHAR);\nCREATE TABLE Detention (detention_id BIGINT, detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, teacher_id BIGINT, datetime_detention_start TIMESTAMP, datetime_detention_end TIMESTAMP, detention_summary VARCHAR, other_details VARCHAR);\nCREATE TABLE Ref_Address_Types (address_type_code VARCHAR /* e.g. 'BILL', 'HOME' */, address_type_description VARCHAR /* e.g. 'Billing', 'Home or Residence' */);\nCREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR /* e.g. 'AFTER', 'BREAK ' */, detention_type_description VARCHAR /* e.g. 'After School', 'During Break time' */);\nCREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR /* e.g. 'DISTURB', 'NOISE' */, incident_type_description VARCHAR /* e.g. 'Disturbance', 'Noise' */);\nCREATE TABLE Student_Addresses (student_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, date_address_to TIMESTAMP, monthly_rental DOUBLE, other_details VARCHAR /* e.g. 'house', 'apartment' */);\nCREATE TABLE Students (student_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Adella', 'Antonietta' */, middle_name VARCHAR /* e.g. 'Arno', 'Ashlee' */, last_name VARCHAR /* e.g. 'Balistreri', 'Bergnaum' */, cell_mobile_number VARCHAR /* e.g. '(062)892-7033', '(568)451-0917x3945' */, email_address VARCHAR /* e.g. 'derrick.jenkins@example.com', 'dicki.kathryne@example.org' */, date_first_rental TIMESTAMP, date_left_university TIMESTAMP, other_student_details VARCHAR /* e.g. 'first honor' */);\nCREATE TABLE Students_in_Detention (student_id BIGINT, detention_id BIGINT, incident_id BIGINT);\nCREATE TABLE Teachers (teacher_id BIGINT, address_id BIGINT, first_name VARCHAR /* e.g. 'Alvis', 'Aniya' */, middle_name VARCHAR /* e.g. 'Ahmad', 'Alexane' */, last_name VARCHAR /* e.g. 'Kuhic', 'Becker' */, gender BIGINT, cell_mobile_number VARCHAR /* e.g. '(381)799-4759x169', '(659)018-0143x379' */, email_address VARCHAR /* e.g. 'deborah37@example.com', 'destany.reichert@example.net' */, other_details VARCHAR /* e.g. 'Dean' */);", "question": "What are the line 1 of addresses shared by some students and some teachers?", "sql": "SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03126", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.", "sql": "SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id, T1.asset_details HAVING COUNT(*) = 2 INTERSECT SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id, T1.asset_details HAVING COUNT(*) < 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03127", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many assets does each maintenance contract contain? List the number and the contract id.", "sql": "SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03128", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many assets does each third party company supply? List the count and the company id.", "sql": "SELECT COUNT(*), T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03129", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.", "sql": "SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id, T1.company_name HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id, T3.company_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03130", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?", "sql": "SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03131", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which engineer has visited the most times? Show the engineer id, first name and last name.", "sql": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON TRUE GROUP BY T1.engineer_id, T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03132", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which parts have more than 2 faults? Show the part name and id.", "sql": "SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id, T1.part_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03133", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "List all every engineer's first name, last name, details and coresponding skill description.", "sql": "SELECT T1.first_name, T1.last_name, T1.other_details, T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03134", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.", "sql": "SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03135", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many assets can each parts be used in? List the part name and the number.", "sql": "SELECT T1.part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03136", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?", "sql": "SELECT T1.fault_description, T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03137", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "sql": "SELECT COUNT(*), T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03138", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "What are all the distinct last names of all the engineers?", "sql": "SELECT DISTINCT last_name FROM Maintenance_Engineers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03139", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many fault status codes are recorded in the fault log parts table?", "sql": "SELECT DISTINCT fault_status FROM Fault_Log_Parts;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03140", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.", "sql": "SELECT first_name, last_name FROM Maintenance_Engineers WHERE engineer_id NOT IN (SELECT engineer_id FROM Engineer_Visits);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03141", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "List the asset id, details, make and model for every asset.", "sql": "SELECT asset_id, asset_details, asset_make, asset_model FROM Assets;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03142", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "When was the first asset acquired?", "sql": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03143", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which part fault requires the most number of skills to fix? List part id and name.", "sql": "SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id, T1.part_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03144", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which kind of part has the least number of faults? List the part name.", "sql": "SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03145", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.", "sql": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id, T1.first_name, T1.last_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03146", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.", "sql": "SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03147", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.", "sql": "SELECT T1.fault_log_entry_id, T1.fault_description, T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id, T1.fault_description, T1.fault_log_entry_datetime ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03148", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which skill is used in fixing the most number of faults? List the skill id and description.", "sql": "SELECT T1.skill_id, T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id, T1.skill_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03149", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "What are all the distinct asset models?", "sql": "SELECT DISTINCT asset_model FROM Assets;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03150", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "List the all the assets make, model, details by the disposed date ascendingly.", "sql": "SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03151", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which part has the least chargeable amount? List the part id and amount.", "sql": "SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03152", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which company started the earliest the maintenance contract? Show the company name.", "sql": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03154", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which gender makes up the majority of the staff?", "sql": "SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03155", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.", "sql": "SELECT T1.staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03156", "db_id": "assets_maintenance", "schema_text": "CREATE TABLE Asset_Parts (asset_id BIGINT, part_id BIGINT);\nCREATE TABLE Assets (asset_id BIGINT, maintenance_contract_id BIGINT, supplier_company_id BIGINT, asset_details VARCHAR /* e.g. 'dell laptop1', 'dell laptop2' */, asset_make VARCHAR /* e.g. 'RU', 'CN' */, asset_model VARCHAR /* e.g. '07 yt', '08 yy' */, asset_acquired_date TIMESTAMP, asset_disposed_date TIMESTAMP, other_asset_details VARCHAR /* e.g. 'Bad condition' */);\nCREATE TABLE Engineer_Skills (engineer_id BIGINT, skill_id BIGINT);\nCREATE TABLE Engineer_Visits (engineer_visit_id BIGINT, contact_staff_id BIGINT, engineer_id BIGINT, fault_log_entry_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Waiting' */, visit_start_datetime TIMESTAMP, visit_end_datetime TIMESTAMP, other_visit_details VARCHAR);\nCREATE TABLE Fault_Log (fault_log_entry_id BIGINT, asset_id BIGINT, recorded_by_staff_id BIGINT, fault_log_entry_datetime TIMESTAMP, fault_description VARCHAR /* e.g. 'system error', 'failed parts' */, other_fault_details VARCHAR);\nCREATE TABLE Fault_Log_Parts (fault_log_entry_id BIGINT, part_fault_id BIGINT, fault_status VARCHAR /* e.g. 'Fixed', 'Reported' */);\nCREATE TABLE Maintenance_Contracts (maintenance_contract_id BIGINT, maintenance_contract_company_id BIGINT, contract_start_date TIMESTAMP, contract_end_date TIMESTAMP, other_contract_details VARCHAR);\nCREATE TABLE Maintenance_Engineers (engineer_id BIGINT, company_id BIGINT, first_name VARCHAR /* e.g. 'Alexys', 'Archibald' */, last_name VARCHAR /* e.g. 'Adams', 'Goldner' */, other_details VARCHAR /* e.g. 'Skilled' */);\nCREATE TABLE Part_Faults (part_fault_id BIGINT, part_id BIGINT, fault_short_name VARCHAR /* e.g. 'PW', 'MW' */, fault_description VARCHAR /* e.g. 'Package Wrong', 'Medium Scale Wrong' */, other_fault_details VARCHAR);\nCREATE TABLE Parts (part_id BIGINT, part_name VARCHAR /* e.g. 'middle', 'package' */, chargeable_yn BIGINT, chargeable_amount BIGINT, other_part_details VARCHAR);\nCREATE TABLE Skills (skill_id BIGINT, skill_code VARCHAR /* e.g. 'ELEC', 'MECH' */, skill_description VARCHAR /* e.g. 'Electrical', 'Mechanical' */);\nCREATE TABLE Skills_Required_To_Fix (part_fault_id BIGINT, skill_id BIGINT);\nCREATE TABLE Staff (staff_id BIGINT, staff_name VARCHAR /* e.g. 'Audreanne', 'Berneice' */, gender BIGINT, other_staff_details VARCHAR /* e.g. 'Manager', 'Woker' */);\nCREATE TABLE Third_Party_Companies (company_id BIGINT, company_type VARCHAR /* e.g. 'Maintenance Contractor', 'Supplier' */, company_name VARCHAR /* e.g. 'Dicki, Erdman and Kris', 'Dooley and Sons' */, company_address VARCHAR /* e.g. '016 Kaitlyn Fall Suite 236', '066 Bechtelar Ridge' */, other_company_details VARCHAR /* e.g. 'Albania', 'Armenia' */);", "question": "Which assets did not incur any fault log? List the asset model.", "sql": "SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03157", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "list the local authorities and services provided by all stations.", "sql": "SELECT local_authority, services FROM station;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03158", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "show all train numbers and names ordered by their time from early to late.", "sql": "SELECT train_number, name FROM train ORDER BY TIME;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03159", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Give me the times and numbers of all trains that go to Chennai, ordered by time.", "sql": "SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03160", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "How many trains have 'Express' in their names?", "sql": "SELECT COUNT(*) FROM train WHERE name ILIKE '%Express%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03161", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the number and time of the train that goes from Chennai to Guruvayur.", "sql": "SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03162", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the number of trains starting from each origin.", "sql": "SELECT origin, COUNT(*) FROM train GROUP BY origin;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03164", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the number of trains for each station, as well as the station network name and services.", "sql": "SELECT COUNT(*), t1.network_name, t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id, t1.network_name, t1.services;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03165", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "What is the average high temperature for each day of week?", "sql": "SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03166", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Give me the maximum low temperature and average precipitation at the Amersham station.", "sql": "SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = 'Amersham';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03167", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find names and times of trains that run through stations for the local authority Chiltern.", "sql": "SELECT t3.name, t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = 'Chiltern';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03168", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "How many different services are provided by all stations?", "sql": "SELECT COUNT(DISTINCT services) FROM station;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03169", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the id and local authority of the station with has the highest average high temperature.", "sql": "SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id, t2.id, t2.local_authority ORDER BY AVG(high_temperature) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03170", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the id and local authority of the station whose maximum precipitation is higher than 50.", "sql": "SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id, t2.id, t2.local_authority HAVING MAX(t1.precipitation) > 50;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03171", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "show the lowest low temperature and highest wind speed in miles per hour.", "sql": "SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03172", "db_id": "station_weather", "schema_text": "CREATE TABLE route (train_id BIGINT, station_id BIGINT);\nCREATE TABLE station (id BIGINT, network_name VARCHAR /* e.g. 'Amersham', 'Brentwood' */, services VARCHAR /* e.g. 'Greater Anglia', 'Metropolitan line and Chiltern Railways' */, local_authority VARCHAR /* e.g. 'Chiltern', 'Three Rivers' */);\nCREATE TABLE train (id BIGINT, train_number BIGINT, name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, origin VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, destination VARCHAR /* e.g. 'Chennai', 'Kanniyakumari' */, time VARCHAR /* e.g. '04:20', '04:55' */, interval VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE weekly_weather (station_id BIGINT, day_of_week VARCHAR /* e.g. 'Monday', 'Tuesday' */, high_temperature BIGINT, low_temperature BIGINT, precipitation DOUBLE, wind_speed_mph BIGINT);", "question": "Find the origins from which more than 1 train starts.", "sql": "SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03173", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of professors in accounting department.", "sql": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03174", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors are in the accounting dept?", "sql": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03175", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors are teaching class with code ACCT-211?", "sql": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03176", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors teach a class with the code ACCT-211?", "sql": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03177", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first and last name of the professor in biology department?", "sql": "SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03178", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first and last name of all biology professors?", "sql": "SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03181", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many classes are professor whose last name is Graztevski has?", "sql": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03182", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many classes does the professor whose last name is Graztevski teach?", "sql": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03183", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the code of the school where the accounting department belongs to?", "sql": "SELECT school_code FROM department WHERE dept_name = 'Accounting';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03184", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the school code of the accounting department?", "sql": "SELECT school_code FROM department WHERE dept_name = 'Accounting';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03185", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many credits does course CIS-220 have, and what its description?", "sql": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03186", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the description for the CIS-220 and how many credits does it have?", "sql": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03187", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "what is the address of history department?", "sql": "SELECT dept_address FROM department WHERE dept_name = 'History';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03188", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Where is the history department?", "sql": "SELECT dept_address FROM department WHERE dept_name = 'History';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03189", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different locations does the school with code BUS has?", "sql": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03190", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the different locations of the school with the code BUS?", "sql": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03191", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different locations does each school have?", "sql": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03192", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Count different addresses of each school.", "sql": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03193", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the description and credit for the course QM-261?", "sql": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03194", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the course description and number of credits for QM-261?", "sql": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03195", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of departments in each school.", "sql": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03196", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many departments are in each school?", "sql": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03197", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of different departments in each school whose number of different departments is less than 5.", "sql": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03198", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different departments are there in each school that has less than 5 apartments?", "sql": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03199", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many sections does each course has?", "sql": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03200", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many sections does each course have?", "sql": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03201", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the total credit does each department offer?", "sql": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03202", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many credits does the department offer?", "sql": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03203", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of classes offered for all class rooms that held at least 2 classes.", "sql": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03204", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "For each classroom with at least 2 classes, how many classes are offered?", "sql": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03205", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of classes in each department.", "sql": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03206", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many classes are held in each department?", "sql": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03207", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of classes in each school.", "sql": "SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03208", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many classes exist for each school?", "sql": "SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03209", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the number of professors for different school?", "sql": "SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03210", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different professors are there for the different schools?", "sql": "SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03211", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the count and code of the job has most employees.", "sql": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03212", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the count and code of the job with the most employee?", "sql": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03213", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Which school has the smallest amount of professors?", "sql": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03214", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Which school has the fewest professors?", "sql": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03215", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of professors with a Ph.D. degree in each department.", "sql": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03216", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors have a Ph.D. in each department?", "sql": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03217", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the number of students for each department.", "sql": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03218", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many students are in each department?", "sql": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03219", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the total number of hours have done for all students in each department.", "sql": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03220", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many hours do the students spend studying in each department?", "sql": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03221", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the max, average, and minimum gpa of all students in each department.", "sql": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03222", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the highest, lowest, and average student GPA for every department?", "sql": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03223", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name and the average gpa of department whose students have the highest average gpa?", "sql": "SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03224", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Which department has the highest average student GPA, and what is the average gpa?", "sql": "SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03225", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "how many schools exist in total?", "sql": "SELECT COUNT(DISTINCT school_code) FROM department;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03226", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many schools are there in the department?", "sql": "SELECT COUNT(DISTINCT school_code) FROM department;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03227", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different classes are there?", "sql": "SELECT COUNT(DISTINCT class_code) FROM CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03228", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many unique classes are offered?", "sql": "SELECT COUNT(DISTINCT class_code) FROM CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03229", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many courses are offered?", "sql": "SELECT COUNT(DISTINCT crs_code) FROM CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03230", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the number of different course codes?", "sql": "SELECT COUNT(DISTINCT crs_code) FROM CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03231", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many departments does the college has?", "sql": "SELECT COUNT(DISTINCT dept_name) FROM department;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03232", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many different departments are there?", "sql": "SELECT COUNT(DISTINCT dept_name) FROM department;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03233", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many courses are offered by the Computer Info. Systems department?", "sql": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03234", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many courses does the department of Computer Information Systmes offer?", "sql": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03235", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many sections does course ACCT-211 has?", "sql": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03236", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the number of different class sections offered in the course ACCT-211?", "sql": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03237", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the total credits of all classes offered by each department.", "sql": "SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03238", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the total number of credits offered by each department?", "sql": "SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03239", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the name of the department that offers the largest number of credits of all classes.", "sql": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code, T3.dept_name ORDER BY SUM(T1.crs_credit) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03240", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Which department offers the most credits all together?", "sql": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code, T3.dept_name ORDER BY SUM(T1.crs_credit) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03241", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many students enrolled in class ACCT-211?", "sql": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03242", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the total number of students enrolled in ACCT-211?", "sql": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03243", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of each student enrolled in class ACCT-211?", "sql": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03244", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all students in course ACCT-211?", "sql": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03245", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of students enrolled in class ACCT-211 and got grade C?", "sql": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03246", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all students who took ACCT-211 and received a C?", "sql": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03247", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the total number of employees.", "sql": "SELECT COUNT(*) FROM employee;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03248", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many employees are there all together?", "sql": "SELECT COUNT(*) FROM employee;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03249", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors do have a Ph.D. degree?", "sql": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03250", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the total number of professors with a Ph.D. ?", "sql": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03251", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many students are enrolled in the class taught by some professor from the accounting department?", "sql": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03252", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many students are enrolled in some classes that are taught by an accounting professor?", "sql": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03253", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name of the department that has the largest number of students enrolled?", "sql": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code, T4.dept_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03254", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name of the department with the most students enrolled?", "sql": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code, T4.dept_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03255", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "list names of all departments ordered by their names.", "sql": "SELECT dept_name FROM department ORDER BY dept_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03256", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the names of all departments in alphabetical order?", "sql": "SELECT dept_name FROM department ORDER BY dept_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03257", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "List the codes of all courses that take place in room KLR209.", "sql": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03258", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the codes of all the courses that are located in room KLR209?", "sql": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03261", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names and offices of all professors sorted by alphabetical order of their first name.", "sql": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03262", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names and office locations for all professors sorted alphabetically by first name?", "sql": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03263", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first and last name of the oldest employee?", "sql": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03264", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first and last names of the employee with the earliest date of birth?", "sql": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03265", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?", "sql": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03266", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?", "sql": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03267", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of students who got grade C in any class?", "sql": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03268", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all students who got a grade C in a class?", "sql": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03273", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of the professors who do not teach a class.", "sql": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03274", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all professors not teaching any classes?", "sql": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03275", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first names of the professors from the history department who do not teach a class.", "sql": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03276", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all history professors who do not teach?", "sql": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03277", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the last name and office of the professor from the history department?", "sql": "SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03278", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the last name and office of all history professors?", "sql": "SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03279", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is department name and office for the professor whose last name is Heffington?", "sql": "SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03280", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name of the department and office location for the professor with the last name of Heffington?", "sql": "SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03283", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the code of the course which the student whose last name is Smithson took?", "sql": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03284", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the course codes for every class that the student with the last name Smithson took?", "sql": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03285", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the description and credit of the course which the student whose last name is Smithson took?", "sql": "SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03286", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many credits is the course that the student with the last name Smithson took, and what is its description?", "sql": "SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03287", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors who has a either Ph.D. or MA degree?", "sql": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03288", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors attained either Ph.D. or Masters degrees?", "sql": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03289", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "How many professors who are from either Accounting or Biology department?", "sql": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03290", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the number of professors who are in the Accounting or Biology departments?", "sql": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03291", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.", "sql": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03292", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of the professor who is teaching CIS-220 and QM-261?", "sql": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03293", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03294", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all students taking accoutning and Computer Information Systems classes?", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03295", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the average gpa of the students enrolled in the course with code ACCT-211?", "sql": "SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03296", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the average GPA of students taking ACCT-211?", "sql": "SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03297", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name, gpa and phone number of the top 5 students with highest gpa?", "sql": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03298", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?", "sql": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03299", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the department name of the students with lowest gpa belongs to?", "sql": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03300", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name of the department with the student that has the lowest GPA?", "sql": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03301", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.", "sql": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03302", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name and GPA of every student that has a GPA lower than average?", "sql": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03303", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the name and address of the department that has the highest number of students.", "sql": "SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name, T2.dept_address ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03304", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name and address of the department with the most students?", "sql": "SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name, T2.dept_address ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03305", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the name, address, number of students in the departments that have the top 3 highest number of students.", "sql": "SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name, T2.dept_address ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03306", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name, address, and number of students in the departments that have the 3 most students?", "sql": "SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code, T2.dept_name, T2.dept_address ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03307", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.", "sql": "SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03308", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names and office of the professors who are in the history department and have a Ph.D?", "sql": "SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03309", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names of all instructors who have taught some course and the course code.", "sql": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03310", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all teachers who have taught a course and the corresponding course codes?", "sql": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03311", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names of all instructors who have taught some course and the course description.", "sql": "SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03312", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all teachers who have taught a course and the corresponding descriptions?", "sql": "SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03313", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names and offices of all instructors who have taught some course and also find the course description.", "sql": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03314", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names, office locations of all lecturers who have taught some course?", "sql": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03315", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.", "sql": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03316", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?", "sql": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03317", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find names of all students who took some course and the course description.", "sql": "SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03318", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the names of all students who took a class and the corresponding course descriptions?", "sql": "SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03319", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find names of all students who took some course and got A or C.", "sql": "SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03320", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the names of all students taking a course who received an A or C?", "sql": "SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03321", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.", "sql": "SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03322", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?", "sql": "SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03323", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.", "sql": "SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03324", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?", "sql": "SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03325", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the last name of the student who got a grade A in the class with code 10018.", "sql": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03326", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the last name of the student who received an A in the class with the code 10018?", "sql": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03327", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first name and office of history professor who did not get a Ph.D. degree.", "sql": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03328", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names and offices of history professors who don't have Ph.D.s?", "sql": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03329", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names of professors who are teaching more than one class.", "sql": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num, T2.emp_fname HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03330", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of all professors who teach more than one class?", "sql": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num, T2.emp_fname HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03331", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the first names of students who took exactly one class.", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num, T1.stu_fname HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03332", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What are the first names of student who only took one course?", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num, T1.stu_fname HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03333", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "Find the name of department that offers the class whose description has the word \"Statistics\".", "sql": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description ILIKE '%Statistics%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03334", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the name of the department that offers a course that has a description including the word \"Statistics\"?", "sql": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description ILIKE '%Statistics%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03335", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname ILIKE 'S%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03336", "db_id": "college_1", "schema_text": "CREATE TABLE CLASS (CLASS_CODE BIGINT, CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'CIS-220' */, CLASS_SECTION BIGINT, CLASS_TIME VARCHAR /* e.g. 'MWF 9:00-9:50 a.m.', 'MWF 10:00-10:50 a.m.' */, CLASS_ROOM VARCHAR /* e.g. 'KLR200', 'KLR209' */, PROF_NUM BIGINT);\nCREATE TABLE COURSE (CRS_CODE VARCHAR /* e.g. 'ACCT-211', 'ACCT-212' */, DEPT_CODE VARCHAR /* e.g. 'CIS', 'ACCT' */, CRS_DESCRIPTION VARCHAR /* e.g. 'Accounting I', 'Accounting II' */, CRS_CREDIT DOUBLE);\nCREATE TABLE DEPARTMENT (DEPT_CODE VARCHAR /* e.g. 'ACCT', 'ART' */, DEPT_NAME VARCHAR /* e.g. 'Accounting', 'Biology' */, SCHOOL_CODE VARCHAR /* e.g. 'A&SCI', 'BUS' */, EMP_NUM BIGINT, DEPT_ADDRESS VARCHAR /* e.g. 'AAK 194, Box 422', 'AAK 230, Box 415' */, DEPT_EXTENSION BIGINT);\nCREATE TABLE EMPLOYEE (EMP_NUM BIGINT, EMP_LNAME VARCHAR, EMP_FNAME VARCHAR, EMP_INITIAL VARCHAR /* e.g. 'B', 'D' */, EMP_JOBCODE VARCHAR /* e.g. 'PROF', 'CUST' */, EMP_HIREDATE TIMESTAMP, EMP_DOB TIMESTAMP);\nCREATE TABLE ENROLL (CLASS_CODE BIGINT, STU_NUM BIGINT, ENROLL_GRADE VARCHAR /* e.g. 'C', 'B' */);\nCREATE TABLE PROFESSOR (EMP_NUM BIGINT, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, PROF_OFFICE VARCHAR /* e.g. 'DRE 102', 'DRE 156' */, PROF_EXTENSION BIGINT, PROF_HIGH_DEGREE VARCHAR /* e.g. 'Ph.D.', 'MA' */);\nCREATE TABLE STUDENT (STU_NUM BIGINT, STU_LNAME VARCHAR /* e.g. 'Smith', 'Bowser' */, STU_FNAME VARCHAR /* e.g. 'John', 'Anne' */, STU_INIT VARCHAR /* e.g. 'B', 'C' */, STU_DOB TIMESTAMP, STU_HRS BIGINT, STU_CLASS VARCHAR /* e.g. 'Sr', 'Jr' */, STU_GPA DOUBLE, STU_TRANSFER DOUBLE, DEPT_CODE VARCHAR /* e.g. 'ACCT', 'CIS' */, STU_PHONE BIGINT, PROF_NUM BIGINT);", "question": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?", "sql": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname ILIKE 'S%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03337", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "How many clubs are there?", "sql": "SELECT COUNT(*) FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03338", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the total number of clubs?", "sql": "SELECT COUNT(*) FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03339", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the distinct region of clubs in ascending alphabetical order.", "sql": "SELECT DISTINCT Region FROM club ORDER BY Region ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03340", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the different regions of clubs in ascending alphabetical order?", "sql": "SELECT DISTINCT Region FROM club ORDER BY Region ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03341", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the average number of gold medals for clubs?", "sql": "SELECT AVG(Gold) FROM club_rank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03342", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the average number of gold medals for a club?", "sql": "SELECT AVG(Gold) FROM club_rank;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03343", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the types and countries of competitions?", "sql": "SELECT Competition_type, Country FROM competition;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03344", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the types of every competition and in which countries are they located?", "sql": "SELECT Competition_type, Country FROM competition;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03345", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the distinct years in which the competitions type is not \"Tournament\"?", "sql": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03346", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the different years for all competitions that are not of type equal to tournament?", "sql": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03347", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the maximum and minimum number of silver medals for clubs.", "sql": "SELECT MAX(Silver), MIN(Silver) FROM club_rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03348", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the maximum and minimum number of silver medals for all the clubs?", "sql": "SELECT MAX(Silver), MIN(Silver) FROM club_rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03349", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "How many clubs have total medals less than 10?", "sql": "SELECT COUNT(*) FROM club_rank WHERE Total < 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03350", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the total number of clubs that have less than 10 medals in total?", "sql": "SELECT COUNT(*) FROM club_rank WHERE Total < 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03351", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List all club names in ascending order of start year.", "sql": "SELECT name FROM club ORDER BY Start_year ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03352", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names of all the clubs starting with the oldest?", "sql": "SELECT name FROM club ORDER BY Start_year ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03353", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List all club names in descending alphabetical order.", "sql": "SELECT name FROM club ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03354", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names of all the clubs ordered in descending alphabetical order?", "sql": "SELECT name FROM club ORDER BY name DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03355", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "Please show the names and the players of clubs.", "sql": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03356", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names and players of all the clubs?", "sql": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03357", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "Show the names of clubs that have players with position \"Right Wing\".", "sql": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03358", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names of the clubs that have players in the position of \"Right Wing\"?", "sql": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03359", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the average points of players from club with name \"AIB\".", "sql": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03360", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the average number of points for players from the \"AIB\" club?", "sql": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03361", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the position of players and the average number of points of players of each position.", "sql": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03362", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "For each position, what is the average number of points for players in that position?", "sql": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03363", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the position of players with average number of points scored by players of that position bigger than 20.", "sql": "SELECT POSITION FROM player GROUP BY name, POSITION HAVING AVG(Points) >= 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03364", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the positions of players whose average number of points scored by that position is larger than 20?", "sql": "SELECT POSITION FROM player GROUP BY name, POSITION HAVING AVG(Points) >= 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03365", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the types of competition and the number of competitions of each type.", "sql": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03366", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the types of competition and number of competitions for that type?", "sql": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03367", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the most common type of competition.", "sql": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03368", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the most common competition type?", "sql": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03369", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the types of competition that have at most five competitions of that type.", "sql": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03370", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the types of competition that have most 5 competitions for that type?", "sql": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03371", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "List the names of clubs that do not have any players.", "sql": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03372", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names of all clubs that do not have any players?", "sql": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03373", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the positions with both players having more than 20 points and less than 10 points.", "sql": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03374", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the positions of both players that have more than 20 20 points and less than 10 points?", "sql": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03375", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "Show total points of all players.", "sql": "SELECT SUM(Points) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03376", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the total number of points for all players?", "sql": "SELECT SUM(Points) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03377", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "how many different positions are there?", "sql": "SELECT COUNT(DISTINCT POSITION) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03378", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "How many different position for players are listed?", "sql": "SELECT COUNT(DISTINCT POSITION) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03379", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "what are the name of players who get more than the average points.", "sql": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03380", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the names of all players that got more than the average number of points?", "sql": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03381", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "find the number of players whose points are lower than 30 in each position.", "sql": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03382", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What is the number of players who have points less than 30 for each position?", "sql": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03383", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "which country did participated in the most number of Tournament competitions?", "sql": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03384", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "what is the name of the country that participated in the most tournament competitions?", "sql": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03385", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "which countries did participated in both Friendly and Tournament type competitions.", "sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03386", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the countries that participated in both friendly and tournament type competitions?", "sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03387", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "Find the countries that have never participated in any competition with Friendly type.", "sql": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03388", "db_id": "sports_competition", "schema_text": "CREATE TABLE club (Club_ID BIGINT, name VARCHAR /* e.g. 'AIB', 'ASC' */, Region VARCHAR /* e.g. 'Brazil', 'China' */, Start_year BIGINT);\nCREATE TABLE club_rank (Rank DOUBLE, Club_ID BIGINT, Gold DOUBLE, Silver DOUBLE, Bronze DOUBLE, Total DOUBLE);\nCREATE TABLE competition (Competition_ID BIGINT, Year DOUBLE, Competition_type VARCHAR /* e.g. 'Friendly', 'Tournament' */, Country VARCHAR /* e.g. 'Russia', 'Australia' */);\nCREATE TABLE competition_result (Competition_ID BIGINT, Club_ID_1 BIGINT, Club_ID_2 BIGINT, Score VARCHAR /* e.g. '10:11', '10:3' */);\nCREATE TABLE player (Player_ID BIGINT, name VARCHAR /* e.g. 'Andy Lynch', 'Chris Feather' */, Position VARCHAR /* e.g. 'Prop', 'Second Row' */, Club_ID BIGINT, Apps DOUBLE, Tries DOUBLE, Goals VARCHAR /* e.g. '0', '0/1' */, Points DOUBLE);", "question": "What are the countries that have never participated in any friendly-type competitions?", "sql": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03389", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "How many furniture components are there in total?", "sql": "SELECT SUM(num_of_component) FROM furniture;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03390", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Return the name and id of the furniture with the highest market rate.", "sql": "SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03392", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the component amounts and names of all furnitures that have more than 10 components.", "sql": "SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03393", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the name and component amount of the least popular furniture.", "sql": "SELECT name, Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03394", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the names of furnitures whose prices are lower than the highest price.", "sql": "SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT MAX(Price_in_Dollar) FROM furniture_manufacte);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03395", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "sql": "SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03396", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the average number of factories for the manufacturers that have more than 20 shops.", "sql": "SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03397", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "List all manufacturer names and ids ordered by their opening year.", "sql": "SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03398", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.", "sql": "SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03399", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.", "sql": "SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03400", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the id and number of shops for the company that produces the most expensive furniture.", "sql": "SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03401", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the number of funiture types produced by each manufacturer as well as the company names.", "sql": "SELECT COUNT(*), t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id, t1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03402", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Give me the names and prices of furnitures which some companies are manufacturing.", "sql": "SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03403", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the market shares and names of furnitures which no any company is producing in our records.", "sql": "SELECT Market_Rate, name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03404", "db_id": "manufacturer", "schema_text": "CREATE TABLE furniture (Furniture_ID BIGINT, Name VARCHAR /* e.g. 'Bench', 'Billiard table' */, Num_of_Component BIGINT, Market_Rate DOUBLE);\nCREATE TABLE furniture_manufacte (Manufacturer_ID BIGINT, Furniture_ID BIGINT, Price_in_Dollar DOUBLE);\nCREATE TABLE manufacturer (Manufacturer_ID BIGINT, Open_Year DOUBLE, Name VARCHAR /* e.g. 'Chevrolet', 'Chevrolet House' */, Num_of_Factories BIGINT, Num_of_Shops BIGINT);", "question": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.", "sql": "SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03405", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Display the first name and department name for each employee.", "sql": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03406", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the first name and department name of all employees?", "sql": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03407", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "List the full name (first and last name), and salary for those employees who earn below 6000.", "sql": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03408", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names and salaries for any employees earning less than 6000?", "sql": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03409", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Display the first name, and department number for all employees whose last name is \"McEwen\".", "sql": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03410", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the first names and department numbers for employees with last name McEwen?", "sql": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03413", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Display all the information about the department Marketing.", "sql": "SELECT * FROM departments WHERE department_name = 'Marketing';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03414", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the information about the Marketing department?", "sql": "SELECT * FROM departments WHERE department_name = 'Marketing';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03421", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "what is the phone number of employees whose salary is in the range of 8000 and 12000?", "sql": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03422", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Return the phone numbers of employees with salaries between 8000 and 12000.", "sql": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03427", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.", "sql": "SELECT first_name, last_name, salary FROM employees WHERE first_name ILIKE '%m';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03428", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Return the full names and salaries for employees with first names that end with the letter m.", "sql": "SELECT first_name, last_name, salary FROM employees WHERE first_name ILIKE '%m';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03429", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.", "sql": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03430", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?", "sql": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03431", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the first and last name for those employees who works either in department 70 or 90?", "sql": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03432", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names of employees who with in department 70 or 90?", "sql": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03435", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display all the details from Employees table for those employees who was hired before 2002-06-21.", "sql": "SELECT * FROM employees WHERE hire_date < '2002-06-21';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03436", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the information about employees hired before June 21, 2002?", "sql": "SELECT * FROM employees WHERE hire_date < '2002-06-21';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03439", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display those employees who joined after 7th September, 1987.", "sql": "SELECT * FROM employees WHERE hire_date > '1987-09-07';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03440", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Which employees were hired after September 7th, 1987?", "sql": "SELECT * FROM employees WHERE hire_date > '1987-09-07';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03441", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the job title of jobs which minimum salary is greater than 9000.", "sql": "SELECT job_title FROM jobs WHERE min_salary > 9000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03442", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Which job titles correspond to jobs with salaries over 9000?", "sql": "SELECT job_title FROM jobs WHERE min_salary > 9000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03443", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.", "sql": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03444", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?", "sql": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03447", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee ID for each employee and the date on which he ended his previous job.", "sql": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03448", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids for each employee and final dates of employment at their last job?", "sql": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03449", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display those departments where more than ten employees work who got a commission percentage.", "sql": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03450", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the department ids for which more than 10 employees had a commission?", "sql": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03451", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find the ids of the departments where any manager is managing 4 or more employees.", "sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03452", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are department ids for departments with managers managing more than 3 employees?", "sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03455", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the country ID and number of cities for each country.", "sql": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03456", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Give the country id and corresponding count of cities in each country.", "sql": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03459", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the ID for those employees who did two or more jobs in the past.", "sql": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03460", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids for employees who have held two or more jobs?", "sql": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03461", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find employee with ID and name of the country presently where (s)he is working.", "sql": "SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03462", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are all the employee ids and the names of the countries in which they work?", "sql": "SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03463", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the department name and number of employees in each of the department.", "sql": "SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03464", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Give the name of each department and the number of employees in each.", "sql": "SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03465", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?", "sql": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03466", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the job history info done by employees earning a salary greater than or equal to 12000?", "sql": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03467", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display job title and average salary of employees.", "sql": "SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title, job_title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03468", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is the average salary for each job title?", "sql": "SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title, job_title;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03469", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?", "sql": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03470", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Provide the full names of employees earning more than the employee with id 163.", "sql": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03471", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "return the smallest salary for every departments.", "sql": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03472", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is the minimum salary in each department?", "sql": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03473", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.", "sql": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03474", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names and department ids for the lowest paid employees across all departments.", "sql": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03475", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find the employee id for all employees who earn more than the average salary.", "sql": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03476", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids for employees who make more than the average?", "sql": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03477", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee id and salary of all employees who report to Payam (first name).", "sql": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03478", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids of employees who report to Payam, and what are their salaries?", "sql": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03479", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "find the name of all departments that do actually have one or more employees assigned to them.", "sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03480", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the names of departments that have at least one employee.", "sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03481", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "get the details of employees who manage a department.", "sql": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03482", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the information regarding employees who are managers?", "sql": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03486", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids for those who had two or more jobs.", "sql": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03487", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03488", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?", "sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03489", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find the job ID for those jobs which average salary is above 8000.", "sql": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03490", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the job ids corresponding to jobs with average salary above 8000?", "sql": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03491", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee ID and job name for all those jobs in department 80.", "sql": "SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03492", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "what are the employee ids and job titles for employees in department 80?", "sql": "SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03493", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is the first name and job id for all employees in the Finance department?", "sql": "SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03494", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Give the first name and job id for all employees in the Finance department.", "sql": "SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03495", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display all the information of the employees whose salary if within the range of smallest salary and 2500.", "sql": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03496", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the information regarding employees with salaries above the minimum and under 2500?", "sql": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03497", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.", "sql": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03498", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?", "sql": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03499", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.", "sql": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03500", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?", "sql": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03501", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.", "sql": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03502", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?", "sql": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03503", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a ’T’.", "sql": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name ILIKE '%T%');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03504", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?", "sql": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name ILIKE '%T%');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03505", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.", "sql": "SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name ILIKE '%J%');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03506", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?", "sql": "SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name ILIKE '%J%');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03507", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.", "sql": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03508", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?", "sql": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03509", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.", "sql": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03510", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "sql": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03511", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the department id and the total salary for those departments which contains at least two employees.", "sql": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03512", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are total salaries and department id for each department that has more than 2 employees?", "sql": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03513", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display all the information of those employees who did not have any job in the past.", "sql": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03514", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What is all the information about employees who have never had a job in the past?", "sql": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03517", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the first and last name, department, city, and state province for each employee.", "sql": "SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03518", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names, departments, cities, and state provinces for each employee?", "sql": "SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03519", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display those employees who contain a letter z to their first name and also display their last name, city.", "sql": "SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name ILIKE '%z%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03520", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the full names and cities of employees who have the letter Z in their first names?", "sql": "SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name ILIKE '%z%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03521", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the department name, city, and state province for each department.", "sql": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03522", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the department names, cities, and state provinces for each department?", "sql": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03523", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.", "sql": "SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03524", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What the full names, ids of each employee and the name of the country they are in?", "sql": "SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03525", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the department name and number of employees in each of the department.", "sql": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03526", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are the department names and how many employees work in each of them?", "sql": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03527", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "display the full name (first and last name), and salary of those employees who working in any department located in London.", "sql": "SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03528", "db_id": "hr_1", "schema_text": "CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DOUBLE);\nCREATE TABLE departments (DEPARTMENT_ID DOUBLE, DEPARTMENT_NAME VARCHAR, MANAGER_ID DOUBLE, LOCATION_ID DOUBLE);\nCREATE TABLE employees (EMPLOYEE_ID DOUBLE, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR /* e.g. 'SA_REP', 'SH_CLERK' */, SALARY DOUBLE, COMMISSION_PCT DOUBLE, MANAGER_ID DOUBLE, DEPARTMENT_ID DOUBLE);\nCREATE TABLE job_history (EMPLOYEE_ID DOUBLE, START_DATE VARCHAR /* e.g. '1998-03-24', '1999-01-01' */, END_DATE VARCHAR /* e.g. '1999-12-31', '1998-12-31' */, JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'ST_CLERK' */, DEPARTMENT_ID DOUBLE);\nCREATE TABLE jobs (JOB_ID VARCHAR /* e.g. 'AC_ACCOUNT', 'AC_MGR' */, JOB_TITLE VARCHAR /* e.g. 'Accountant', 'Accounting Manager' */, MIN_SALARY DOUBLE, MAX_SALARY DOUBLE);\nCREATE TABLE locations (LOCATION_ID DOUBLE, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR /* e.g. '\"Distrito Federal', 'BE' */, COUNTRY_ID VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE regions (REGION_ID DOUBLE, REGION_NAME VARCHAR /* e.g. 'Americas\\r', 'Asia\\r' */);", "question": "What are full names and salaries of employees working in the city of London?", "sql": "SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03529", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the name of the song that was released in the most recent year?", "sql": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03530", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the name of the song that was released most recently?", "sql": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03531", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the id of the longest song?", "sql": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03532", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the id of the song that lasts the longest.", "sql": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03533", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names of all English songs.", "sql": "SELECT song_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03534", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all songs in English?", "sql": "SELECT song_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03535", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the id of songs whose format is mp3.", "sql": "SELECT f_id FROM files WHERE formats = 'mp3';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03536", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the id of all the files in mp3 format?", "sql": "SELECT f_id FROM files WHERE formats = 'mp3';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03537", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the name and country of origin for all singers who have produced songs with rating above 9.", "sql": "SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03538", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the different names and countries of origins for all artists whose song ratings are above 9?", "sql": "SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03539", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the file size and format for all songs that have resolution lower than 800.", "sql": "SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03540", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the file sizes and formats for all songs with a resolution lower than 800?", "sql": "SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03541", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the name of the artist who produced the shortest song?", "sql": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03542", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the artists who sang the shortest song?", "sql": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03543", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names and countries of origin for the artists who produced the top three highly rated songs.", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03544", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03545", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many songs have 4 minute duration?", "sql": "SELECT COUNT(*) FROM files WHERE duration ILIKE '4:%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03546", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the count of the songs that last approximately 4 minutes?", "sql": "SELECT COUNT(*) FROM files WHERE duration ILIKE '4:%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03547", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many artists are from Bangladesh?", "sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03548", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many Bangladeshi artists are listed?", "sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03549", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the average rating of songs produced by female artists?", "sql": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03550", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many songs, on average, are sung by a female artist?", "sql": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03551", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the most popular file format?", "sql": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03552", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the file format that is used by the most files.", "sql": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03553", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names of the artists who are from UK and have produced English songs.", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03554", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the artists that are from the UK and sang songs in English?", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03555", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.", "sql": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03556", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?", "sql": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03557", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the country of origin of the artist who is female and produced a song in Bangla?", "sql": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03558", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What countries are the female artists who sung in the language Bangla from?", "sql": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03561", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the number of artists for each gender?", "sql": "SELECT COUNT(*), gender FROM artist GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03562", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many artists are male and how many are female?", "sql": "SELECT COUNT(*), gender FROM artist GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03563", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the average rating of songs for each language?", "sql": "SELECT AVG(rating), languages FROM song GROUP BY languages;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03564", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the average song rating for each language?", "sql": "SELECT AVG(rating), languages FROM song GROUP BY languages;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03565", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Return the gender and name of artist who produced the song with the lowest resolution.", "sql": "SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03566", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the gender and name of the artist who sang the song with the smallest resolution?", "sql": "SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03567", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "For each file format, return the number of artists who released songs in that format.", "sql": "SELECT COUNT(*), formats FROM files GROUP BY formats;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03568", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "How many songs were released for each format?", "sql": "SELECT COUNT(*), formats FROM files GROUP BY formats;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03569", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the distinct names of all songs that have a higher resolution than some songs in English.", "sql": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03570", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the different names for all songs that have a higher resolution than English songs?", "sql": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03571", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all songs that have a lower rating than some song of blues genre?", "sql": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03572", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the songs that have a lower rating than at least one blues song?", "sql": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03573", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the name and country of origin of the artist who released a song that has \"love\" in its title?", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name ILIKE '%love%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03574", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the artists who released a song that has the word love in its title, and where are the artists from?", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name ILIKE '%love%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03575", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the name and gender for all artists who released songs in March.", "sql": "SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate ILIKE '%Mar%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03576", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names and genders of all artists who released songs in the month of March?", "sql": "SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate ILIKE '%Mar%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03577", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the names of all genres in alphabetical oder, together with its ratings.", "sql": "SELECT g_name, rating FROM genre ORDER BY g_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03578", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all genres in alphabetical order, combined with its ratings?", "sql": "SELECT g_name, rating FROM genre ORDER BY g_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03579", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Give me a list of the names of all songs ordered by their resolution.", "sql": "SELECT song_name FROM song ORDER BY resolution;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03580", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all songs that are ordered by their resolution numbers?", "sql": "SELECT song_name FROM song ORDER BY resolution;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03581", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the ids of songs that are available in either mp4 format or have resolution above 720?", "sql": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03582", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?", "sql": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03583", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the names of all songs that have 4 minute duration or are in English.", "sql": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration ILIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03584", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all songs that are approximately 4 minutes long or are in English?", "sql": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration ILIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03585", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the language used most often in the songs?", "sql": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03586", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the languages that are used most often in songs?", "sql": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03589", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of artists who are Male and are from UK?", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03590", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all male British artists?", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03591", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names of songs whose genre is modern or language is English.", "sql": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03592", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the songs that are modern or sung in English?", "sql": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03593", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Return the names of songs for which format is mp3 and resolution is below 1000.", "sql": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03594", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?", "sql": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03595", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Return the names of singers who are from UK and released an English song.", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03596", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of all singers that are from the UK and released a song in English?", "sql": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03597", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the average rating and resolution of songs that are in Bangla?", "sql": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03598", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the average rating and resolution of all bangla songs?", "sql": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03599", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?", "sql": "SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration ILIKE '3:%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03600", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", "sql": "SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration ILIKE '3:%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03601", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the maximum duration and resolution of songs grouped and ordered by languages?", "sql": "SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03602", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?", "sql": "SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03603", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?", "sql": "SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03604", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", "sql": "SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03605", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names and number of works of all artists who have at least one English songs.", "sql": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name, T1.artist_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03606", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names and number of works for all artists who have sung at least one song in English?", "sql": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name, T1.artist_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03607", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name, T1.artist_name, T1.country HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03608", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?", "sql": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name, T1.artist_name, T1.country HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03613", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the songs whose rating is below the rating of all songs in English?", "sql": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03614", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the song names for every song whose rating is less than the minimum rating for English songs?", "sql": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03615", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?", "sql": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03616", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?", "sql": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03617", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?", "sql": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03618", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?", "sql": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03621", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the id, genre and artist name of English songs ordered by rating.", "sql": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03622", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?", "sql": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03623", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "List the duration, file size and format of songs whose genre is pop, ordered by title?", "sql": "SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03624", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?", "sql": "SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03625", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names of the artists who have produced English songs but have never received rating higher than 8.", "sql": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03626", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?", "sql": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03627", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.", "sql": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03628", "db_id": "music_1", "schema_text": "CREATE TABLE artist (artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, gender VARCHAR /* e.g. 'Female', 'Male' */, preferred_genre VARCHAR /* e.g. 'blues', 'folk' */);\nCREATE TABLE files (f_id DOUBLE, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, file_size VARCHAR /* e.g. '3.69 MB', '3.78 MB' */, duration VARCHAR /* e.g. '2:56', '3:45' */, formats VARCHAR /* e.g. 'mp4', 'mp3' */);\nCREATE TABLE genre (g_name VARCHAR /* e.g. 'blues', 'folk' */, rating BIGINT, most_popular_in VARCHAR /* e.g. 'Bangladesh', 'America' */);\nCREATE TABLE song (song_name VARCHAR /* e.g. 'Aj ei akash', 'Ami opar hoye' */, artist_name VARCHAR /* e.g. 'Enrique', 'Farida' */, country VARCHAR /* e.g. 'Bangladesh', 'India' */, f_id DOUBLE, genre_is VARCHAR /* e.g. 'blues', 'folk' */, rating DOUBLE, languages VARCHAR /* e.g. 'bangla', 'english' */, releasedate VARCHAR /* e.g. '17-MAR-2002', '21-SEP-1997' */, resolution DOUBLE);", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "sql": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03629", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "what is the full name and id of the college with the largest number of baseball players?", "sql": "SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id, T1.name_full ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03630", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the full name and id of the college that has the most baseball players.", "sql": "SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id, T1.name_full ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03631", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is average salary of the players in the team named 'Boston Red Stockings' ?", "sql": "SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03632", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Compute the average salary of the players in the team called 'Boston Red Stockings'.", "sql": "SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03633", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are first and last names of players participating in all star game in 1998?", "sql": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03634", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List the first and last name for players who participated in all star game in 1998.", "sql": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03635", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.", "sql": "SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03636", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.", "sql": "SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03637", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many players enter hall of fame each year?", "sql": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03638", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Count the number of players who enter hall of fame for each year.", "sql": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03639", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the average number of attendance at home games for each year?", "sql": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03640", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "For each year, return the year and the average number of attendance at home games.", "sql": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03642", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the id and rank of the team that has the highest average attendance rate in 2014.", "sql": "SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id, T2.team_id, T2.rank ORDER BY AVG(T1.attendance) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03643", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are the manager's first name, last name and id who won the most manager award?", "sql": "SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03644", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "sql": "SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03645", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many parks are there in the state of NY?", "sql": "SELECT COUNT(*) FROM park WHERE state = 'NY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03646", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Show me the number of parks the state of NY has.", "sql": "SELECT COUNT(*) FROM park WHERE state = 'NY';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03647", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which 3 players won the most player awards? List their full name and id.", "sql": "SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03648", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the first name, last name and id for the top three players won the most player awards.", "sql": "SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id, T1.name_first, T1.name_last ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03653", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.", "sql": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03654", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Count the number of players who were born in USA and have bats information 'R'.", "sql": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03659", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are the name and id of the team offering the lowest average salary?", "sql": "SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id, T1.name ORDER BY AVG(T2.salary) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03660", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which team offers the lowest average salary? Give me the name and id of the team.", "sql": "SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id, T1.name ORDER BY AVG(T2.salary) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03661", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the players' first name and last name who won award both in 1960 and in 1961.", "sql": "SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 ON TRUE WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 ON TRUE WHERE T2.year = 1961;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03662", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which players won awards in both 1960 and 1961? Return their first names and last names.", "sql": "SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 ON TRUE WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 ON TRUE WHERE T2.year = 1961;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03665", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?", "sql": "SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03666", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", "sql": "SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03667", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many times did Boston Red Stockings lose in 2009 postseason?", "sql": "SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03668", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "sql": "SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03671", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?", "sql": "SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03672", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.", "sql": "SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03673", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the total number of postseason games that team Boston Red Stockings participated in?", "sql": "SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03674", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many times in total did the team Boston Red Stockings participate in postseason games?", "sql": "SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03675", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?", "sql": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03676", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.", "sql": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03677", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the total salary paid by team Boston Red Stockings in 2010?", "sql": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03678", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the total salary expenses of team Boston Red Stockings in 2010?", "sql": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03679", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many players were in the team Boston Red Stockings in 2000?", "sql": "SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03680", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many players did Boston Red Stockings have in 2000?", "sql": "SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03681", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List the 3 highest salaries of the players in 2001?", "sql": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03682", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How much salary did the top 3 well-paid players get in 2001?", "sql": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03683", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What were all the salary values of players in 2010 and 2001?", "sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03684", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List all the salary values players received in 2010 and 2001.", "sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03685", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "In which year did the least people enter hall of fame?", "sql": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03686", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the year in which the least people enter hall of fame.", "sql": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03687", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many parks are there in Atlanta city?", "sql": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03688", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many parks does Atlanta city have?", "sql": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03689", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many games were played in park \"Columbia Park\" in 1907?", "sql": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03690", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Count the number of games taken place in park \"Columbia Park\" in 1907.", "sql": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03691", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many games were played in city Atlanta in 2000?", "sql": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03692", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the number of games taken place in city Atlanta in 2000.", "sql": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03693", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?", "sql": "SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03694", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", "sql": "SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03695", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?", "sql": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03696", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.", "sql": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03697", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.", "sql": "SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03698", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?", "sql": "SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03699", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", "sql": "SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03700", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", "sql": "SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03701", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which team had the least number of attendances in home games in 1980?", "sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03702", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the team that attended the least number of home games in 1980.", "sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03703", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "List the names of states that have more than 2 parks.", "sql": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03704", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which states have more than 2 parks?", "sql": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03705", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "How many team franchises are active, with active value 'Y'?", "sql": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03706", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find the number of team franchises that are active (have 'Y' as \"active\" information).", "sql": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03707", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which cities have 2 to 4 parks?", "sql": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03708", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Find all the cities that have 2 to 4 parks.", "sql": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03709", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which park had most attendances in 2008?", "sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03710", "db_id": "baseball_1", "schema_text": "CREATE TABLE all_star (player_id VARCHAR, year BIGINT, game_num BIGINT, game_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'AL', 'NL' */, gp DOUBLE, starting_pos DOUBLE);\nCREATE TABLE appearances (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, g_all DOUBLE, gs DOUBLE, g_batting BIGINT, g_defense DOUBLE, g_p BIGINT, g_c BIGINT, g_1b BIGINT, g_2b BIGINT, g_3b BIGINT, g_ss BIGINT, g_lf BIGINT, g_cf BIGINT, g_rf BIGINT, g_of BIGINT, g_dh DOUBLE, g_ph DOUBLE, g_pr DOUBLE);\nCREATE TABLE batting (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab DOUBLE, r DOUBLE, h DOUBLE, double DOUBLE, triple DOUBLE, hr DOUBLE, rbi DOUBLE, sb DOUBLE, cs DOUBLE, bb DOUBLE, so DOUBLE, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE batting_postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, player_id VARCHAR, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, g BIGINT, ab BIGINT, r BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, rbi BIGINT, sb BIGINT, cs DOUBLE, bb BIGINT, so BIGINT, ibb DOUBLE, hbp DOUBLE, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE college (college_id VARCHAR, name_full VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE fielding (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, pos VARCHAR /* e.g. 'P', 'OF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po DOUBLE, a DOUBLE, e DOUBLE, dp DOUBLE, pb DOUBLE, wp DOUBLE, sb DOUBLE, cs DOUBLE, zr DOUBLE);\nCREATE TABLE fielding_outfield (player_id VARCHAR, year BIGINT, stint BIGINT, glf DOUBLE, gcf DOUBLE, grf DOUBLE);\nCREATE TABLE fielding_postseason (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, round VARCHAR /* e.g. 'WS', 'NLCS' */, pos VARCHAR /* e.g. 'P', 'LF' */, g BIGINT, gs DOUBLE, inn_outs DOUBLE, po BIGINT, a BIGINT, e BIGINT, dp BIGINT, tp BIGINT, pb DOUBLE, sb DOUBLE, cs DOUBLE);\nCREATE TABLE hall_of_fame (player_id VARCHAR, yearid BIGINT, votedby VARCHAR /* e.g. 'BBWAA', 'Veterans' */, ballots DOUBLE, needed DOUBLE, votes DOUBLE, inducted VARCHAR /* e.g. 'N', 'Y' */, category VARCHAR /* e.g. 'Player', 'Manager' */, needed_note VARCHAR /* e.g. '1st', 'Top 20' */);\nCREATE TABLE home_game (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, park_id VARCHAR, span_first VARCHAR, span_last VARCHAR, games BIGINT, openings BIGINT, attendance BIGINT);\nCREATE TABLE manager (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, g BIGINT, w BIGINT, l BIGINT, rank DOUBLE, plyr_mgr VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE manager_award (player_id VARCHAR, award_id VARCHAR /* e.g. 'TSN Manager of the Year', 'BBWAA Manager of the year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes DOUBLE);\nCREATE TABLE manager_award_vote (award_id VARCHAR /* e.g. 'Mgr of the year', 'Mgr of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won BIGINT, points_max BIGINT, votes_first BIGINT);\nCREATE TABLE manager_half (player_id VARCHAR, year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, inseason BIGINT, half BIGINT, g BIGINT, w BIGINT, l BIGINT, rank BIGINT);\nCREATE TABLE park (park_id VARCHAR, park_name VARCHAR, park_alias VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR /* e.g. 'US', 'CA' */);\nCREATE TABLE pitching (player_id VARCHAR, year BIGINT, stint BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts DOUBLE, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp DOUBLE, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk BIGINT, bfp DOUBLE, gf DOUBLE, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE pitching_postseason (player_id VARCHAR, year BIGINT, round VARCHAR /* e.g. 'WS', 'NLCS' */, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, w BIGINT, l BIGINT, g BIGINT, gs BIGINT, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, h BIGINT, er BIGINT, hr BIGINT, bb BIGINT, so BIGINT, baopp VARCHAR, era DOUBLE, ibb DOUBLE, wp DOUBLE, hbp DOUBLE, bk DOUBLE, bfp DOUBLE, gf BIGINT, r BIGINT, sh DOUBLE, sf DOUBLE, g_idp DOUBLE);\nCREATE TABLE player (player_id VARCHAR, birth_year DOUBLE, birth_month DOUBLE, birth_day DOUBLE, birth_country VARCHAR, birth_state VARCHAR, birth_city VARCHAR, death_year DOUBLE, death_month DOUBLE, death_day DOUBLE, death_country VARCHAR, death_state VARCHAR, death_city VARCHAR, name_first VARCHAR, name_last VARCHAR, name_given VARCHAR, weight DOUBLE, height DOUBLE, bats VARCHAR /* e.g. 'R', 'L' */, throws VARCHAR /* e.g. 'R', 'L' */, debut VARCHAR, final_game VARCHAR, retro_id VARCHAR, bbref_id VARCHAR);\nCREATE TABLE player_award (player_id VARCHAR, award_id VARCHAR, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, tie VARCHAR /* e.g. 'Y' */, notes VARCHAR);\nCREATE TABLE player_award_vote (award_id VARCHAR /* e.g. 'MVP', 'Rookie of the Year' */, year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, player_id VARCHAR, points_won DOUBLE, points_max BIGINT, votes_first DOUBLE);\nCREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR, year BIGINT);\nCREATE TABLE postseason (year BIGINT, round VARCHAR /* e.g. 'WS', 'ALCS' */, team_id_winner VARCHAR, league_id_winner VARCHAR /* e.g. 'AL', 'NL' */, team_id_loser VARCHAR, league_id_loser VARCHAR /* e.g. 'NL', 'AL' */, wins BIGINT, losses BIGINT, ties BIGINT);\nCREATE TABLE salary (year BIGINT, team_id VARCHAR, league_id VARCHAR /* e.g. 'NL', 'AL' */, player_id VARCHAR, salary BIGINT);\nCREATE TABLE team (year BIGINT, league_id VARCHAR /* e.g. 'NL', 'AL' */, team_id VARCHAR, franchise_id VARCHAR, div_id VARCHAR /* e.g. 'E', 'W' */, rank BIGINT, g BIGINT, ghome DOUBLE, w BIGINT, l BIGINT, div_win VARCHAR /* e.g. 'N', 'Y' */, wc_win VARCHAR /* e.g. 'N', 'Y' */, lg_win VARCHAR /* e.g. 'N', 'Y' */, ws_win VARCHAR /* e.g. 'N', 'Y' */, r BIGINT, ab BIGINT, h BIGINT, double BIGINT, triple BIGINT, hr BIGINT, bb BIGINT, so DOUBLE, sb DOUBLE, cs DOUBLE, hbp DOUBLE, sf DOUBLE, ra BIGINT, er BIGINT, era DOUBLE, cg BIGINT, sho BIGINT, sv BIGINT, ipouts BIGINT, ha BIGINT, hra BIGINT, bba BIGINT, soa BIGINT, e BIGINT, dp DOUBLE, fp DOUBLE, name VARCHAR, park VARCHAR, attendance DOUBLE, bpf BIGINT, ppf BIGINT, team_id_br VARCHAR, team_id_lahman45 VARCHAR, team_id_retro VARCHAR);\nCREATE TABLE team_franchise (franchise_id VARCHAR, franchise_name VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */, na_assoc VARCHAR /* e.g. 'ATH', 'ATL' */);\nCREATE TABLE team_half (year BIGINT, league_id VARCHAR /* e.g. 'AL', 'NL' */, team_id VARCHAR, half BIGINT, div_id VARCHAR /* e.g. 'E', 'W' */, div_win VARCHAR /* e.g. 'N' */, rank BIGINT, g BIGINT, w BIGINT, l BIGINT);", "question": "Which park did the most people attend in 2008?", "sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03711", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "How many camera lenses have a focal length longer than 15 mm?", "sql": "SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03712", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", "sql": "SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03713", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "List the id, color scheme, and name for all the photos.", "sql": "SELECT id, color, name FROM photos;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03714", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the maximum and average height of the mountains?", "sql": "SELECT MAX(height), AVG(height) FROM mountain;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03715", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the average prominence of the mountains in country 'Morocco'?", "sql": "SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03716", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", "sql": "SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03717", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the id and name of the photos for mountains?", "sql": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03718", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the id and name of the mountains that have at least 2 photos?", "sql": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id, T1.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03719", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the names of the cameras that have taken picture of the most mountains?", "sql": "SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03720", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?", "sql": "SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03721", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "How many different kinds of lens brands are there?", "sql": "SELECT COUNT(DISTINCT brand) FROM camera_lens;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03722", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "How many camera lenses are not used in taking any photos?", "sql": "SELECT COUNT(*) FROM camera_lens WHERE id NOT IN (SELECT camera_lens_id FROM photos);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03723", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?", "sql": "SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03724", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'", "sql": "SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03725", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.", "sql": "SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03726", "db_id": "mountain_photos", "schema_text": "CREATE TABLE camera_lens (id BIGINT, brand VARCHAR /* e.g. 'Olympus', 'Panasonic' */, name VARCHAR /* e.g. 'Olympus 15mm f/8.0 Body Cap', 'Olympus M.Zuiko Digital ED 45mm f/1.8' */, focal_length_mm DOUBLE, max_aperture DOUBLE);\nCREATE TABLE mountain (id BIGINT, name VARCHAR, Height DOUBLE, Prominence DOUBLE, Range VARCHAR /* e.g. 'Toubkal Atlas', 'Arsi Mountains' */, Country VARCHAR /* e.g. 'Ethiopia', 'Morocco' */);\nCREATE TABLE photos (id BIGINT, camera_lens_id BIGINT, mountain_id BIGINT, color VARCHAR /* e.g. 'RBG', 'Black/White' */, name VARCHAR /* e.g. 'cloud', 'deers' */);", "question": "List the camera lens names containing substring \"Digital\".", "sql": "SELECT name FROM camera_lens WHERE name ILIKE '%Digital%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03728", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Find the names of channels that are not owned by CCTV.", "sql": "SELECT name FROM channel WHERE OWNER <> 'CCTV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03729", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which channels are not owned by CCTV? Give me the channel names.", "sql": "SELECT name FROM channel WHERE OWNER <> 'CCTV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03730", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "List all channel names ordered by their rating in percent from big to small.", "sql": "SELECT name FROM channel ORDER BY rating_in_percent DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03731", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Give me a list of all the channel names sorted by the channel rating in descending order.", "sql": "SELECT name FROM channel ORDER BY rating_in_percent DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03732", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What is the owner of the channel that has the highest rating ratio?", "sql": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03733", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Show me the owner of the channel with the highest rating.", "sql": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03734", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "how many programs are there?", "sql": "SELECT COUNT(*) FROM program;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03735", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Count the number of programs.", "sql": "SELECT COUNT(*) FROM program;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03736", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "list all the names of programs, ordering by launch time.", "sql": "SELECT name FROM program ORDER BY launch;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03737", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What is the list of program names, sorted by the order of launch date?", "sql": "SELECT name FROM program ORDER BY launch;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03738", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "List the name, origin and owner of each program.", "sql": "SELECT name, origin, OWNER FROM program;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03739", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What are the name, origin and owner of each program?", "sql": "SELECT name, origin, OWNER FROM program;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03740", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "find the name of the program that was launched most recently.", "sql": "SELECT name FROM program ORDER BY launch DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03741", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which program was launched most recently? Return the program name.", "sql": "SELECT name FROM program ORDER BY launch DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03742", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "find the total percentage share of all channels owned by CCTV.", "sql": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03743", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What is the total share (in percent) of all the channels owned by CCTV?", "sql": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03744", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Find the names of the channels that are broadcast in the morning.", "sql": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03745", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which channels are broadcast in the morning? Give me the channel names.", "sql": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03746", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "what are the names of the channels that broadcast in both morning and night?", "sql": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03747", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which channels broadcast both in the morning and at night? Give me the channel names.", "sql": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03748", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "how many programs are broadcast in each time section of the day?", "sql": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03749", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Count the number of programs broadcast for each time section of a day.", "sql": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03750", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "find the number of different programs that are broadcast during night time.", "sql": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03751", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "How many distinct programs are broadcast at \"Night\" time?", "sql": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03752", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Find the names of programs that are never broadcasted in the morning.", "sql": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03753", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which programs are never broadcasted in the morning? Give me the names of the programs.", "sql": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03754", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "find the program owners that have some programs in both morning and night time.", "sql": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03755", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Who are the owners of the programs that broadcast both in the morning and at night?", "sql": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03756", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "List all program origins in the alphabetical order.", "sql": "SELECT origin FROM program ORDER BY origin;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03757", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What is the list of program origins ordered alphabetically?", "sql": "SELECT origin FROM program ORDER BY origin;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03758", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "what is the number of different channel owners?", "sql": "SELECT COUNT(DISTINCT OWNER) FROM channel;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03759", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Count the number of distinct channel owners.", "sql": "SELECT COUNT(DISTINCT OWNER) FROM channel;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03760", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "find the names of programs whose origin is not in Beijing.", "sql": "SELECT name FROM program WHERE origin <> 'Beijing';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03761", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which programs' origins are not \"Beijing\"? Give me the program names.", "sql": "SELECT name FROM program WHERE origin <> 'Beijing';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03762", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What are the names of the channels owned by CCTV or HBS?", "sql": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03763", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "List the names of all the channels owned by either CCTV or HBS", "sql": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03764", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Find the total rating ratio for each channel owner.", "sql": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03765", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "What is the total rating of channel for each channel owner?", "sql": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03767", "db_id": "program_share", "schema_text": "CREATE TABLE broadcast (Channel_ID BIGINT, Program_ID BIGINT, Time_of_day VARCHAR /* e.g. 'Night', 'Morning' */);\nCREATE TABLE broadcast_share (Channel_ID BIGINT, Program_ID BIGINT, Date VARCHAR /* e.g. '01,May', '03,May' */, Share_in_percent DOUBLE);\nCREATE TABLE channel (Channel_ID BIGINT, Name VARCHAR /* e.g. 'Anhui Satellite TV', 'CCTV-1' */, Owner VARCHAR /* e.g. 'CCTV', 'Anhui Television' */, Share_in_percent DOUBLE, Rating_in_percent DOUBLE);\nCREATE TABLE program (Program_ID BIGINT, Name VARCHAR /* e.g. 'Aniworld', 'Jiajia' */, Origin VARCHAR /* e.g. 'Beijing', 'Guangdong' */, Launch DOUBLE, Owner VARCHAR /* e.g. 'Beijing Television (BTV)', 'Hunan Broadcasting System (HBS)' */);", "question": "Which program is broadcast most frequently? Give me the program name.", "sql": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id, t1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03850", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.", "sql": "SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id, T1.Date_Claim_Made HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03851", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim.", "sql": "SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id, T1.Date_Claim_Made HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03852", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.", "sql": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id, T1.customer_details HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03853", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.", "sql": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id, T1.customer_details HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03854", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "List the method, date and amount of all the payments, in ascending order of date.", "sql": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03855", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What are the method, date and amount of each payment? Sort the list in ascending order of date.", "sql": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03856", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.", "sql": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03857", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.", "sql": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03858", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.", "sql": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03859", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.", "sql": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03860", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.", "sql": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03861", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.", "sql": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03862", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.", "sql": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03863", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Return the claim start date for the claims whose claimed amount is no more than the average", "sql": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03864", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "How many settlements does each claim correspond to? List the claim id and the number of settlements.", "sql": "SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03865", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.", "sql": "SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03866", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.", "sql": "SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id, T1.date_claim_made ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03867", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.", "sql": "SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id, T1.date_claim_made ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03868", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.", "sql": "SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id, T1.Date_Claim_Settled ORDER BY T1.Date_Claim_Settled DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03869", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.", "sql": "SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id, T1.Date_Claim_Settled ORDER BY T1.Date_Claim_Settled DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03870", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Of all the claims, what was the earliest date when any claim was made?", "sql": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03871", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Tell me the the date when the first claim was made.", "sql": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03872", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What is the total amount of settlement made for all the settlements?", "sql": "SELECT SUM(Amount_Settled) FROM Settlements;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03873", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Compute the total amount of settlement across all the settlements.", "sql": "SELECT SUM(Amount_Settled) FROM Settlements;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03874", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Who are the customers that had more than 1 policy? List the customer details and id.", "sql": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id, T1.customer_details HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03875", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the the customer details and id for the customers who had more than one policy.", "sql": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id, T1.customer_details HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03876", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What are the claim dates and settlement dates of all the settlements?", "sql": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03877", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Tell me the the claim date and settlement date for each settlement case.", "sql": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03878", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What is the most popular payment method?", "sql": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03879", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which payment method is used the most often?", "sql": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03880", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "With which kind of payment method were the least number of payments processed?", "sql": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03881", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What is the payment method that were used the least often?", "sql": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03882", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What is the total amount of payment?", "sql": "SELECT SUM(Amount_Payment) FROM Payments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03883", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Compute the total amount of payment processed.", "sql": "SELECT SUM(Amount_Payment) FROM Payments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03884", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What are all the distinct details of the customers?", "sql": "SELECT DISTINCT customer_details FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03885", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Return the distinct customer details.", "sql": "SELECT DISTINCT customer_details FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03886", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which kind of policy type was chosen by the most customers?", "sql": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03887", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the policy type the most customers choose.", "sql": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03888", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "How many settlements are there in total?", "sql": "SELECT COUNT(*) FROM Settlements;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03889", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Count the total number of settlements made.", "sql": "SELECT COUNT(*) FROM Settlements;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03890", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which Payments were processed with Visa? List the payment Id, the date and the amount.", "sql": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03891", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Give me the payment Id, the date and the amount for all the payments processed with Visa.", "sql": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03892", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "List the details of the customers who do not have any policies.", "sql": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03893", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which customers do not have any policies? Find the details of these customers.", "sql": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03894", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.", "sql": "SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03895", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.", "sql": "SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03896", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "Find the total claimed amount of all the claims.", "sql": "SELECT SUM(Amount_Claimed) FROM Claims;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03897", "db_id": "insurance_policies", "schema_text": "CREATE TABLE Claims (Claim_ID BIGINT, Policy_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT);\nCREATE TABLE Customer_Policies (Policy_ID BIGINT, Customer_ID BIGINT, Policy_Type_Code VARCHAR /* e.g. 'Travel', 'Car' */, Start_Date DATE, End_Date DATE);\nCREATE TABLE Customers (Customer_ID BIGINT, Customer_Details VARCHAR /* e.g. 'America Jaskolski', 'Augustine Kerluke' */);\nCREATE TABLE Payments (Payment_ID BIGINT, Settlement_ID BIGINT, Payment_Method_Code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Date_Payment_Made DATE, Amount_Payment BIGINT);\nCREATE TABLE Settlements (Settlement_ID BIGINT, Claim_ID BIGINT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed BIGINT, Amount_Settled BIGINT, Customer_Policy_ID BIGINT);", "question": "What is total amount claimed summed across all the claims?", "sql": "SELECT SUM(Amount_Claimed) FROM Claims;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03898", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which department has the largest number of employees?", "sql": "SELECT name FROM department GROUP BY departmentID, name ORDER BY COUNT(departmentID) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03900", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the employee id of the head whose department has the least number of employees?", "sql": "SELECT head FROM department GROUP BY departmentID, head ORDER BY COUNT(departmentID) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03901", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Tell me the employee id of the head of the department with the least employees.", "sql": "SELECT head FROM department GROUP BY departmentID, head ORDER BY COUNT(departmentID) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03902", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "what is the name and position of the head whose department has least number of employees?", "sql": "SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID, T2.name, T2.position ORDER BY COUNT(departmentID) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03903", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name and position of the head of the department with the least employees.", "sql": "SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID, T2.name, T2.position ORDER BY COUNT(departmentID) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03904", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are names of patients who made an appointment?", "sql": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03905", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the names of patients who have made appointments.", "sql": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03906", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "what are name and phone number of patients who had more than one appointment?", "sql": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient, name, phone HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03907", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which patients made more than one appointment? Tell me the name and phone number of these patients.", "sql": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient, name, phone HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03908", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the id of the appointment with the most recent start date?", "sql": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03909", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the id of the appointment that started most recently?", "sql": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03910", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the name of physicians who took some appointment.", "sql": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03911", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of all the physicians who took appointments.", "sql": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03912", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the name of physicians who never took any appointment.", "sql": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03913", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians have never taken any appointment? Find their names.", "sql": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03914", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of all physicians and their primary affiliated departments' names.", "sql": "SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03915", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the name and primarily affiliated department name of each physician?", "sql": "SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03916", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the name of the patient who made the most recent appointment?", "sql": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03917", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of the patient who made the appointment with the most recent start date.", "sql": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03918", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many patients stay in room 112?", "sql": "SELECT COUNT(patient) FROM stay WHERE room = 112;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03919", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Count the number of patients who stayed in room 112.", "sql": "SELECT COUNT(patient) FROM stay WHERE room = 112;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03920", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many patients' prescriptions are made by physician John Dorian?", "sql": "SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03921", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of patients' prescriptions physician John Dorian made.", "sql": "SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03922", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of medication used on the patient who stays in room 111?", "sql": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03923", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the name of the medication used for the patient staying in room 111?", "sql": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03924", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the patient who most recently stayed in room 111.", "sql": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03925", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the id of the patient who stayed in room 111 most recently?", "sql": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03926", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the name of the nurse has the most appointments?", "sql": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03927", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of the nurse who has the largest number of appointments.", "sql": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid, T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03928", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many patients do each physician take care of? List their names and number of patients they take care of.", "sql": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03929", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Return the name of each physician and the number of patients he or she treats.", "sql": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03930", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of physicians who are in charge of more than one patient.", "sql": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03931", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians are in charge of more than one patient? Give me their names.", "sql": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03932", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of rooms located on each block floor.", "sql": "SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03933", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many rooms does each block floor have?", "sql": "SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03934", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of rooms for different block code?", "sql": "SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03935", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many rooms are located for each block code?", "sql": "SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03936", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the unique block codes that have available rooms?", "sql": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03937", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Tell me the distinct block codes where some rooms are available.", "sql": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03938", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many different types of rooms are there?", "sql": "SELECT COUNT(DISTINCT roomtype) FROM room;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03939", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of distinct room types available.", "sql": "SELECT COUNT(DISTINCT roomtype) FROM room;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03940", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the names of the physicians who prescribe medication Thesisin?", "sql": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03941", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the names of all the physicians who prescribe Thesisin as medication.", "sql": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03942", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name and position of physicians who prescribe some medication whose brand is X?", "sql": "SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03943", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.", "sql": "SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03944", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of medications prescribed for each brand.", "sql": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03945", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many medications are prescribed for each brand?", "sql": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand, T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03946", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of physicians whose position title contains the word 'senior'.", "sql": "SELECT name FROM physician WHERE POSITION ILIKE '%senior%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03947", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of the physicians who have 'senior' in their titles.", "sql": "SELECT name FROM physician WHERE POSITION ILIKE '%senior%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03948", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the patient who has the most recent undergoing treatment?", "sql": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03949", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which patient is undergoing the most recent treatment?", "sql": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03950", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of all patients who have an undergoing treatment and are staying in room 111.", "sql": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03951", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of patients who are staying in room 111 and have an undergoing treatment?", "sql": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03952", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the names of all distinct nurses ordered by alphabetical order?", "sql": "SELECT DISTINCT name FROM nurse ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03953", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the alphabetically ordered list of all the distinct names of nurses?", "sql": "SELECT DISTINCT name FROM nurse ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03954", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of nurses who are nursing an undergoing treatment.", "sql": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03955", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which nurses are in charge of patients undergoing treatments?", "sql": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03956", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the names of all distinct medications, ordered in an alphabetical order.", "sql": "SELECT DISTINCT name FROM medication ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03957", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the alphabetically ordered list of all distinct medications?", "sql": "SELECT DISTINCT name FROM medication ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03960", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the physicians' employee ids together with their primary affiliation departments' ids.", "sql": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03961", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are each physician's employee id and department id primarily affiliated.", "sql": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03962", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the names of departments where some physicians are primarily affiliated with.", "sql": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03963", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of departments that have primarily affiliated physicians.", "sql": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03964", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", "sql": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03965", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the ids of the nurses who are on call in block floor 1 and block code 1.", "sql": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03966", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the highest cost, lowest cost and average cost of procedures?", "sql": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03967", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Tell me the highest, lowest, and average cost of procedures.", "sql": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03968", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.", "sql": "SELECT name, cost FROM procedures ORDER BY cost DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03969", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Sort the list of names and costs of all procedures in the descending order of cost.", "sql": "SELECT name, cost FROM procedures ORDER BY cost DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03970", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the three most expensive procedures.", "sql": "SELECT name FROM procedures ORDER BY cost LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03971", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the three most costly procedures?", "sql": "SELECT name FROM procedures ORDER BY cost LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_03972", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the physicians who are trained in a procedure that costs more than 5000.", "sql": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03973", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians are trained in procedures that are more expensive than 5000?", "sql": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03974", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the physician who was trained in the most expensive procedure?", "sql": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03975", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physician was trained in the procedure that costs the most.", "sql": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03976", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What is the average cost of procedures that physician John Wen was trained in?", "sql": "SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03977", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Compute the mean price of procedures physician John Wen was trained in.", "sql": "SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03978", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of procedures which physician John Wen was trained in.", "sql": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03979", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of procedures physician John Wen was trained in?", "sql": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03980", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.", "sql": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03981", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?", "sql": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03982", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?", "sql": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03983", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?", "sql": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03984", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.", "sql": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03985", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What procedures cost less than 5000 and have John Wen as a trained physician?", "sql": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03986", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.", "sql": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03987", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.", "sql": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03988", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.", "sql": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03989", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.", "sql": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03990", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of patients who are not using the medication of Procrastin-X.", "sql": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03991", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the names of patients who are not taking the medication of Procrastin-X.", "sql": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_03992", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the number of patients who are not using the medication of Procrastin-X.", "sql": "SELECT COUNT(*) FROM patient WHERE SSN NOT IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03993", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many patients are not using Procrastin-X as medication?", "sql": "SELECT COUNT(*) FROM patient WHERE SSN NOT IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_03994", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "How many appointments are there?", "sql": "SELECT COUNT(*) FROM appointment;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03995", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Count how many appointments have been made in total.", "sql": "SELECT COUNT(*) FROM appointment;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03996", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "Find the names of nurses who are on call.", "sql": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03997", "db_id": "hospital_1", "schema_text": "CREATE TABLE Affiliated_With (Physician BIGINT, Department BIGINT, PrimaryAffiliation BIGINT);\nCREATE TABLE Appointment (AppointmentID BIGINT, Patient BIGINT, PrepNurse BIGINT, Physician BIGINT, Start TIMESTAMP, \"End\" TIMESTAMP, ExaminationRoom VARCHAR /* e.g. 'A', 'B' */);\nCREATE TABLE Block (BlockFloor BIGINT, BlockCode BIGINT);\nCREATE TABLE Department (DepartmentID BIGINT, Name VARCHAR /* e.g. 'General Medicine', 'Psychiatry' */, Head BIGINT);\nCREATE TABLE Medication (Code BIGINT, Name VARCHAR /* e.g. 'Awakin', 'Crescavitin' */, Brand VARCHAR /* e.g. 'Bar Laboratories', 'Baz Industries' */, Description VARCHAR /* e.g. 'N/A' */);\nCREATE TABLE Nurse (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Carla Espinosa', 'Laverne Roberts' */, Position VARCHAR /* e.g. 'Nurse', 'Head Nurse' */, Registered BIGINT, SSN BIGINT);\nCREATE TABLE On_Call (Nurse BIGINT, BlockFloor BIGINT, BlockCode BIGINT, OnCallStart TIMESTAMP, OnCallEnd TIMESTAMP);\nCREATE TABLE Patient (SSN BIGINT, Name VARCHAR /* e.g. 'Dennis Doe', 'Grace Ritchie' */, Address VARCHAR /* e.g. '101 Omgbbq Street', '1100 Foobaz Avenue' */, Phone VARCHAR /* e.g. '555-0256', '555-0512' */, InsuranceID BIGINT, PCP BIGINT);\nCREATE TABLE Physician (EmployeeID BIGINT, Name VARCHAR /* e.g. 'Bob Kelso', 'Christopher Turk' */, Position VARCHAR /* e.g. 'Surgical Attending Physician', 'Attending Physician' */, SSN BIGINT);\nCREATE TABLE Prescribes (Physician BIGINT, Patient BIGINT, Medication BIGINT, Date TIMESTAMP, Appointment BIGINT, Dose BIGINT);\nCREATE TABLE Procedures (Code BIGINT, Name VARCHAR /* e.g. 'Complete Walletectomy', 'Folded Demiophtalmectomy' */, Cost DOUBLE);\nCREATE TABLE Room (RoomNumber BIGINT, RoomType VARCHAR /* e.g. 'Single' */, BlockFloor BIGINT, BlockCode BIGINT, Unavailable BIGINT);\nCREATE TABLE Stay (StayID BIGINT, Patient BIGINT, Room BIGINT, StayStart TIMESTAMP, StayEnd TIMESTAMP);\nCREATE TABLE Trained_In (Physician BIGINT, Treatment BIGINT, CertificationDate TIMESTAMP, CertificationExpires TIMESTAMP);\nCREATE TABLE Undergoes (Patient BIGINT, Procedures BIGINT, Stay BIGINT, DateUndergoes TIMESTAMP, Physician BIGINT, AssistingNurse BIGINT);", "question": "What are the distinct names of nurses on call?", "sql": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03998", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "How many ships are there?", "sql": "SELECT COUNT(*) FROM ship;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_03999", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What is the number of ships?", "sql": "SELECT COUNT(*) FROM ship;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04000", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "List the name of ships in ascending order of tonnage.", "sql": "SELECT Name FROM ship ORDER BY Tonnage ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04001", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "what are the names of the ships ordered by ascending tonnage?", "sql": "SELECT Name FROM ship ORDER BY Tonnage ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04002", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the type and nationality of ships?", "sql": "SELECT TYPE, Nationality FROM ship;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04003", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the types and nationalities of every ship?", "sql": "SELECT TYPE, Nationality FROM ship;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04004", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "List the name of ships whose nationality is not \"United States\".", "sql": "SELECT Name FROM ship WHERE Nationality <> 'United States';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04005", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the names of the ships that are not from the United States?", "sql": "SELECT Name FROM ship WHERE Nationality <> 'United States';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04006", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show the name of ships whose nationality is either United States or United Kingdom.", "sql": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04007", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the names of the ships that are from either the US or the UK?", "sql": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04008", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What is the name of the ship with the largest tonnage?", "sql": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04009", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What is the ship with the largest amount of tonnage called?", "sql": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04010", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show different types of ships and the number of ships of each type.", "sql": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04011", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "For each type, how many ships are there?", "sql": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04012", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Please show the most common type of ships.", "sql": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04013", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What is the most common type of ships?", "sql": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04014", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "List the nations that have more than two ships.", "sql": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04015", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the nations that have more than two ships?", "sql": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04016", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show different types of ships and the average tonnage of ships of each type.", "sql": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04017", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "For each type, what is the average tonnage?", "sql": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04018", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show codes and fates of missions, and names of ships involved.", "sql": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04019", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the mission codes, fates, and names of the ships involved?", "sql": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04020", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show names of ships involved in a mission launched after 1928.", "sql": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04021", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the names of ships that were involved in a mission launched after 1928?", "sql": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04022", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show the distinct fate of missions that involve ships with nationality \"United States\"", "sql": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04023", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the different fates of the mission that involved ships from the United States?", "sql": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04024", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "List the name of ships that are not involved in any mission", "sql": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04025", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the names of the ships that are not involved in any missions?", "sql": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04026", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.", "sql": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04027", "db_id": "ship_mission", "schema_text": "CREATE TABLE mission (Mission_ID BIGINT, Ship_ID BIGINT, Code VARCHAR /* e.g. 'VMV-1', 'VMV-2' */, Launched_Year BIGINT, Location VARCHAR /* e.g. 'Germany', 'Uusikaupunki , Finland' */, Speed_knots BIGINT, Fate VARCHAR /* e.g. 'Decommissioned 1950', 'Decommissioned 1959' */);\nCREATE TABLE ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'Appam', 'Ariadne' */, Type VARCHAR /* e.g. 'Cargo ship', 'Battle ship' */, Nationality VARCHAR /* e.g. 'United Kingdom', 'United States' */, Tonnage BIGINT);", "question": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?", "sql": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04028", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of students in total.", "sql": "SELECT COUNT(*) FROM list;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04029", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many students are there?", "sql": "SELECT COUNT(*) FROM list;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04030", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the last names of students studying in room 111.", "sql": "SELECT lastname FROM list WHERE classroom = 111;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04031", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the last names of students in room 111?", "sql": "SELECT lastname FROM list WHERE classroom = 111;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04032", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the first names of students studying in room 108.", "sql": "SELECT firstname FROM list WHERE classroom = 108;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04033", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the first names of students in room 108?", "sql": "SELECT firstname FROM list WHERE classroom = 108;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04034", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the first names of students studying in room 107?", "sql": "SELECT DISTINCT firstname FROM list WHERE classroom = 107;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04035", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "List the first names of all the students in room 107.", "sql": "SELECT DISTINCT firstname FROM list WHERE classroom = 107;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04036", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.", "sql": "SELECT DISTINCT classroom, grade FROM list;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04037", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the grade number and classroom number of each class in the list?", "sql": "SELECT DISTINCT classroom, grade FROM list;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04038", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which grade is studying in classroom 103?", "sql": "SELECT DISTINCT grade FROM list WHERE classroom = 103;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04039", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the grade taught in classroom 103.", "sql": "SELECT DISTINCT grade FROM list WHERE classroom = 103;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04040", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the grade studying in room 105.", "sql": "SELECT DISTINCT grade FROM list WHERE classroom = 105;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04041", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which grade is studying in room 105?", "sql": "SELECT DISTINCT grade FROM list WHERE classroom = 105;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04042", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which classrooms are used by grade 4?", "sql": "SELECT DISTINCT classroom FROM list WHERE grade = 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04043", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the classrooms in which grade 4 is studying.", "sql": "SELECT DISTINCT classroom FROM list WHERE grade = 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04044", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which classrooms are used by grade 5?", "sql": "SELECT DISTINCT classroom FROM list WHERE grade = 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04045", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Show me the classrooms grade 5 is using.", "sql": "SELECT DISTINCT classroom FROM list WHERE grade = 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04046", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the last names of the teachers that teach fifth grade.", "sql": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04047", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "what are the last names of the teachers who teach grade 5?", "sql": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04048", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the first names of the teachers that teach first grade.", "sql": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04049", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the first names of the teachers who teach grade 1?", "sql": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04050", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the first names of all the teachers that teach in classroom 110.", "sql": "SELECT firstname FROM teachers WHERE classroom = 110;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04051", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which teachers teach in classroom 110? Give me their first names.", "sql": "SELECT firstname FROM teachers WHERE classroom = 110;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04052", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the last names of teachers teaching in classroom 109.", "sql": "SELECT lastname FROM teachers WHERE classroom = 109;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04053", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which teachers teach in classroom 109? Give me their last names.", "sql": "SELECT lastname FROM teachers WHERE classroom = 109;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04054", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Report the first name and last name of all the teachers.", "sql": "SELECT DISTINCT firstname, lastname FROM teachers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04055", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the first name and last name of all the teachers?", "sql": "SELECT DISTINCT firstname, lastname FROM teachers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04056", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Report the first name and last name of all the students.", "sql": "SELECT DISTINCT firstname, lastname FROM list;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04057", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Show each student's first name and last name.", "sql": "SELECT DISTINCT firstname, lastname FROM list;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04058", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find all students taught by OTHA MOYER. Output the first and last names of the students.", "sql": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04059", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.", "sql": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04060", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find all students taught by MARROTTE KIRK. Output first and last names of students.", "sql": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04061", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which are the first and last names of the students taught by MARROTTE KIRK?", "sql": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04062", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.", "sql": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04063", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.", "sql": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04064", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the last names of all the teachers that teach GELL TAMI.", "sql": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04065", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the last names of the teachers who teach the student called GELL TAMI?", "sql": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04066", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many students does LORIA ONDERSMA teaches?", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04067", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Count the number of students the teacher LORIA ONDERSMA teaches.", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04068", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many students does KAWA GORDON teaches?", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04069", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of students taught by the teacher KAWA GORDON.", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04070", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of students taught by TARRING LEIA.", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04071", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many students are taught by teacher TARRING LEIA?", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04072", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many teachers does the student named CHRISSY NABOZNY have?", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04073", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of teachers who teach the student called CHRISSY NABOZNY.", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04074", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many teachers does the student named MADLOCK RAY have?", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04075", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of teachers who teach the student called MADLOCK RAY.", "sql": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04076", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.", "sql": "SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04077", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?", "sql": "SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04078", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the last names of the students in third grade that are not taught by COVIN JEROME.", "sql": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04079", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.", "sql": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04080", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.", "sql": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04081", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.", "sql": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04082", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each classroom, report the classroom number and the number of grades using it.", "sql": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04083", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each classroom, show the classroom number and count the number of distinct grades that use the room.", "sql": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04084", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which classroom has the most students?", "sql": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04085", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the classroom that the most students use.", "sql": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04086", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Report the number of students in each classroom.", "sql": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04087", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each classroom, show the classroom number and find how many students are using it.", "sql": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04088", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each grade 0 classroom, report the total number of students.", "sql": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04089", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each grade 0 classroom, return the classroom number and the count of students.", "sql": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04090", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Report the total number of students for each fourth-grade classroom.", "sql": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04091", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "For each fourth-grade classroom, show the classroom number and the total number of students using it.", "sql": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04092", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the name of the teacher who teaches the largest number of students.", "sql": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04093", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Which teacher teaches the most students? Give me the first name and last name of the teacher.", "sql": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04094", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "Find the number of students in one classroom.", "sql": "SELECT COUNT(*), classroom FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04095", "db_id": "student_1", "schema_text": "CREATE TABLE list (LastName VARCHAR, FirstName VARCHAR, Grade BIGINT, Classroom BIGINT);\nCREATE TABLE teachers (LastName VARCHAR /* e.g. 'COVIN', 'KAWA' */, FirstName VARCHAR /* e.g. ' ALFREDA', ' BILLIE' */, Classroom BIGINT);", "question": "How many students does one classroom have?", "sql": "SELECT COUNT(*), classroom FROM list GROUP BY classroom;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04112", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "How many film are there?", "sql": "SELECT COUNT(*) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04113", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Count the number of films.", "sql": "SELECT COUNT(*) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04114", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List the distinct director of all films.", "sql": "SELECT DISTINCT Director FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04115", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the different film Directors?", "sql": "SELECT DISTINCT Director FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04116", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What is the average ticket sales gross in dollars of films?", "sql": "SELECT AVG(Gross_in_dollar) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04117", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Return the average gross sales in dollars across all films.", "sql": "SELECT AVG(Gross_in_dollar) FROM film;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04118", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the low and high estimates of film markets?", "sql": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04119", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Return the low and high estimates for all film markets.", "sql": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04120", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the types of film market estimations in year 1995?", "sql": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04121", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Return the types of film market estimations in 1995.", "sql": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04122", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the maximum and minimum number of cities in all markets.", "sql": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04123", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Return the maximum and minimum number of cities across all markets.", "sql": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04124", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "How many markets have number of cities smaller than 300?", "sql": "SELECT COUNT(*) FROM market WHERE Number_cities < 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04125", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Count the number of markets that have a number of cities lower than 300.", "sql": "SELECT COUNT(*) FROM market WHERE Number_cities < 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04126", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List all countries of markets in ascending alphabetical order.", "sql": "SELECT Country FROM market ORDER BY Country ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04127", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the countries for each market, ordered alphabetically?", "sql": "SELECT Country FROM market ORDER BY Country ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04128", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List all countries of markets in descending order of number of cities.", "sql": "SELECT Country FROM market ORDER BY Number_cities DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04129", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the countries for each market ordered by decreasing number of cities?", "sql": "SELECT Country FROM market ORDER BY Number_cities DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04130", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Please show the titles of films and the types of market estimations.", "sql": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04131", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the titles of films and corresponding types of market estimations?", "sql": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04132", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Show the distinct director of films with market estimation in the year of 1995.", "sql": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04133", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Who are the different directors of films which had market estimation in 1995?", "sql": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04134", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What is the average number of cities of markets with low film market estimate bigger than 10000?", "sql": "SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04135", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Give the average number of cities within markets that had a low market estimation larger than 10000?", "sql": "SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04136", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Please list the countries and years of film market estimations.", "sql": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04137", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the countries of markets and their corresponding years of market estimation?", "sql": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04138", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Please list the years of film market estimations when the market is in country \"Japan\" in descending order.", "sql": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04139", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the years of film market estimation for the market of Japan, ordered by year descending?", "sql": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04140", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List the studios of each film and the number of films produced by that studio.", "sql": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04141", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "How films are produced by each studio?", "sql": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04144", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List the names of studios that have at least two films.", "sql": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04145", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the names of studios that have made two or more films?", "sql": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04146", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List the title of films that do not have any market estimation.", "sql": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04147", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the titles of films that do not have a film market estimation?", "sql": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04148", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\".", "sql": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04149", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?", "sql": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04150", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\".", "sql": "SELECT title, Studio FROM film WHERE Studio ILIKE '%Universal%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04151", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?", "sql": "SELECT title, Studio FROM film WHERE Studio ILIKE '%Universal%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04152", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Show the studios that have not produced films with director \"Walter Hill\".", "sql": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04153", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Which studios have never worked with the director Walter Hill?", "sql": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04154", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "List the studios which average gross is above 4500000.", "sql": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04155", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Which studios have an average gross of over 4500000?", "sql": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04158", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "What are the titles and directors of the films were never presented in China?", "sql": "SELECT title, director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04159", "db_id": "film_rank", "schema_text": "CREATE TABLE film (Film_ID BIGINT, Title VARCHAR /* e.g. '48 Hrs', 'An Officer and a Gentleman' */, Studio VARCHAR /* e.g. '20th Century Fox', 'Columbia' */, Director VARCHAR /* e.g. 'Bob Clark', 'Colin Higgins' */, Gross_in_dollar BIGINT);\nCREATE TABLE film_market_estimation (Estimation_ID BIGINT, Low_Estimate DOUBLE, High_Estimate DOUBLE, Film_ID BIGINT, Type VARCHAR /* e.g. 'Mass suicide', 'Mass suicide murder' */, Market_ID BIGINT, Year BIGINT);\nCREATE TABLE market (Market_ID BIGINT, Country VARCHAR /* e.g. 'China', 'France' */, Number_cities BIGINT);", "question": "Return the titles and directors of films that were never in the market of China.", "sql": "SELECT title, director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04160", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many calendar items do we have?", "sql": "SELECT COUNT(*) FROM Ref_calendar;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04161", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Count the number of all the calendar items.", "sql": "SELECT COUNT(*) FROM Ref_calendar;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04162", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show all calendar dates and day Numbers.", "sql": "SELECT calendar_date, day_Number FROM Ref_calendar;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04163", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are all the calendar dates and day Numbers?", "sql": "SELECT calendar_date, day_Number FROM Ref_calendar;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04164", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the number of document types.", "sql": "SELECT COUNT(*) FROM Ref_document_types;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04165", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many document types are there?", "sql": "SELECT COUNT(*) FROM Ref_document_types;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04166", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "List all document type codes and document type names.", "sql": "SELECT document_type_code, document_type_name FROM Ref_document_types;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04167", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are all the document type codes and document type names?", "sql": "SELECT document_type_code, document_type_name FROM Ref_document_types;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04168", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the name and description for document type code RV?", "sql": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04169", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Give me the name and description of the document type code RV.", "sql": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04170", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the document type code for document type \"Paper\"?", "sql": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04171", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the code of the document type \"Paper\".", "sql": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04172", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the number of documents with document type code CV or BK.", "sql": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04173", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many documents have document type code CV or BK?", "sql": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04174", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the date when the document \"Marry CV\" was stored?", "sql": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04175", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "When was the document named \"Marry CV\" stored? Give me the date.", "sql": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04176", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the day Number and date of all the documents?", "sql": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04177", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Return the day Number and stored date for all the documents.", "sql": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04178", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the document type name for the document with name \"How to read a book\"?", "sql": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04179", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the document type name of the document named \"How to read a book\".", "sql": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04180", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the number of locations.", "sql": "SELECT COUNT(*) FROM Ref_locations;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04181", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many locations are listed in the database?", "sql": "SELECT COUNT(*) FROM Ref_locations;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04182", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "List all location codes and location names.", "sql": "SELECT location_code, location_name FROM Ref_locations;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04183", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are all the location codes and location names?", "sql": "SELECT location_code, location_name FROM Ref_locations;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04184", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the name and description for location code x?", "sql": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04185", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Give me the name and description of the location with code x.", "sql": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04186", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the location code for the country \"Canada\"?", "sql": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04187", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location code of the country \"Canada\".", "sql": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04188", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many roles are there?", "sql": "SELECT COUNT(*) FROM ROLES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04189", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Count the total number of roles listed.", "sql": "SELECT COUNT(*) FROM ROLES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04190", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "List all role codes, role names, and role descriptions.", "sql": "SELECT role_code, role_name, role_description FROM ROLES;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04191", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are all the role codes, role names, and role descriptions?", "sql": "SELECT role_code, role_name, role_description FROM ROLES;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04192", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the name and description for role code \"MG\"?", "sql": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04193", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the name and description of the role with code \"MG\".", "sql": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04194", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the description for role name \"Proof Reader\".", "sql": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04195", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the description of the role named \"Proof Reader\"?", "sql": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04196", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "How many employees do we have?", "sql": "SELECT COUNT(*) FROM Employees;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04197", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the number of employees we have.", "sql": "SELECT COUNT(*) FROM Employees;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04198", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the name, role code, and date of birth for the employee with name 'Armani'.", "sql": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04199", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the name, role code, and date of birth of the employee named 'Armani'?", "sql": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04200", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the id for the employee called Ebba?", "sql": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04201", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the id of the employee named Ebba.", "sql": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04202", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the names of all the employees with role \"HR\".", "sql": "SELECT employee_name FROM Employees WHERE role_code = 'HR';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04203", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Which employees have the role with code \"HR\"? Find their names.", "sql": "SELECT employee_name FROM Employees WHERE role_code = 'HR';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04204", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show all role codes and the number of employees in each role.", "sql": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04205", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the code of each role and the number of employees in each role?", "sql": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04206", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the role code with the largest number of employees?", "sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04207", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the code of the role that have the most employees.", "sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04208", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show all role codes with at least 3 employees.", "sql": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04209", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the roles with three or more employees? Give me the role codes.", "sql": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04210", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the role code with the least employees.", "sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04211", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the role with the smallest number of employees? Find the role codes.", "sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04212", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the role name and role description for employee called Ebba?", "sql": "SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04213", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the name and description of the role played by the employee named Ebba.", "sql": "SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04214", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the names of employees with role name Editor.", "sql": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04215", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the names of all the employees whose the role name is \"Editor\".", "sql": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04216", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\".", "sql": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04217", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"?", "sql": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04218", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the different location codes for documents?", "sql": "SELECT DISTINCT location_code FROM Document_locations;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04219", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Give me all the distinct location codes for documents.", "sql": "SELECT DISTINCT location_code FROM Document_locations;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04220", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location name for document \"Robin CV\".", "sql": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04221", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the location name of the document \"Robin CV\"?", "sql": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04222", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location code, the starting date and ending data in that location for all the documents.", "sql": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04223", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are each document's location code, and starting date and ending data in that location?", "sql": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04224", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"?", "sql": "SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04225", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the starting date and ending data in location for the document named \"Robin CV\".", "sql": "SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04226", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location codes and the number of documents in each location.", "sql": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04227", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the code of each location and the number of documents in that location?", "sql": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04228", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What is the location code with the most documents?", "sql": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04229", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Find the code of the location with the largest number of documents.", "sql": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04230", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location codes with at least 3 documents.", "sql": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04231", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the codes of the locations with at least three documents?", "sql": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04232", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the location name and code with the least documents.", "sql": "SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code, T2.location_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04233", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the name and code of the location with the smallest number of documents?", "sql": "SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code, T2.location_name ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04234", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?", "sql": "SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04235", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.", "sql": "SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04236", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the id of each employee and the number of document destruction authorised by that employee.", "sql": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04237", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the id of each employee and the number of document destruction authorised by that employee?", "sql": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04238", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the employee ids and the number of documents destroyed by each employee.", "sql": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04239", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the id of each employee and the number of document destroyed by that employee?", "sql": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04240", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the ids of the employees who don't authorize destruction for any document.", "sql": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04241", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Which employees do not authorize destruction for any document? Give me their employee ids.", "sql": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04242", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the ids of all employees who have authorized destruction.", "sql": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04243", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the ids of all the employees who authorize document destruction?", "sql": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04244", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the ids of all employees who have destroyed a document.", "sql": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04245", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "What are the ids of all the employees who have destroyed documents?", "sql": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04246", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the ids of all employees who don't destroy any document.", "sql": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04247", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Which employees do not destroy any document? Find their employee ids.", "sql": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04248", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.", "sql": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04249", "db_id": "cre_Doc_Tracking_DB", "schema_text": "CREATE TABLE All_Documents (Document_ID BIGINT, Date_Stored TIMESTAMP, Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Name VARCHAR /* e.g. 'Alan CV', 'Are you talking to a machine' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Document_Locations (Document_ID BIGINT, Location_Code VARCHAR /* e.g. 'x', 'e' */, Date_in_Location_From TIMESTAMP, Date_in_Locaton_To TIMESTAMP);\nCREATE TABLE Documents_to_be_Destroyed (Document_ID BIGINT, Destruction_Authorised_by_Employee_ID BIGINT, Destroyed_by_Employee_ID BIGINT, Planned_Destruction_Date TIMESTAMP, Actual_Destruction_Date TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Employees (Employee_ID BIGINT, Role_Code VARCHAR /* e.g. 'ED', 'PR' */, Employee_Name VARCHAR /* e.g. 'Alene', 'Armani' */, Gender_MFU VARCHAR /* e.g. '1' */, Date_of_Birth TIMESTAMP, Other_Details VARCHAR);\nCREATE TABLE Ref_Calendar (Calendar_Date TIMESTAMP, Day_Number BIGINT);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR);\nCREATE TABLE Ref_Locations (Location_Code VARCHAR /* e.g. 'b', 'c' */, Location_Name VARCHAR /* e.g. 'Brazil', 'Canada' */, Location_Description VARCHAR);\nCREATE TABLE Roles (Role_Code VARCHAR /* e.g. 'ED', 'HR' */, Role_Name VARCHAR /* e.g. 'Editor', 'Human Resource' */, Role_Description VARCHAR);", "question": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.", "sql": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04250", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many clubs are there?", "sql": "SELECT COUNT(*) FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04251", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the total number of clubs.", "sql": "SELECT COUNT(*) FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04252", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of all clubs?", "sql": "SELECT clubname FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04253", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give me the name of each club.", "sql": "SELECT clubname FROM club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04254", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are there?", "sql": "SELECT COUNT(*) FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04255", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the total number of students.", "sql": "SELECT COUNT(*) FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04256", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of all the students?", "sql": "SELECT DISTINCT fname FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04257", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find each student's first name.", "sql": "SELECT DISTINCT fname FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04258", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the last names of the members of the club \"Bootup Baltimore\".", "sql": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04259", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who are the members of the club named \"Bootup Baltimore\"? Give me their last names.", "sql": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04260", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name.", "sql": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04261", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Return the last name for the members of the club named \"Hopkins Student Enterprises\".", "sql": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04262", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many members does the club \"Tennis Club\" has?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04263", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the members of the club \"Tennis Club\".", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04264", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of members of club \"Pen and Paper Gaming\".", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04265", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many people have membership in the club \"Pen and Paper Gaming\"?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04266", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many clubs does \"Linda Smith\" belong to?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04267", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many clubs does \"Linda Smith\" have membership for?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04268", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of clubs where \"Tracy Kim\" is a member.", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04269", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "For how many clubs is \"Tracy Kim\" a member?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04270", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04271", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give me the first name and last name for all the female members of the club \"Bootup Baltimore\".", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04272", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04273", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"?", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04274", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04275", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04276", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which club has the most members majoring in \"600\"?", "sql": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04277", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the club which has the largest number of members majoring in \"600\".", "sql": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04280", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the description of the club named \"Tennis Club\"?", "sql": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04281", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the description of the club called \"Tennis Club\".", "sql": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04282", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the description of the club \"Pen and Paper Gaming\".", "sql": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04283", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the description of the club \"Pen and Paper Gaming\"?", "sql": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04284", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the location of the club named \"Tennis Club\"?", "sql": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04285", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Where us the club named \"Tennis Club\" located?", "sql": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04286", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the location of the club \"Pen and Paper Gaming\".", "sql": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04287", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Where is the club \"Pen and Paper Gaming\" located?", "sql": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04288", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Where is the club \"Hopkins Student Enterprises\" located?", "sql": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04289", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Tell me the location of the club \"Hopkins Student Enterprises\".", "sql": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04290", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of all the clubs at \"AKW\".", "sql": "SELECT clubname FROM club WHERE clublocation = 'AKW';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04291", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which clubs are located at \"AKW\"? Return the club names.", "sql": "SELECT clubname FROM club WHERE clublocation = 'AKW';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04292", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many clubs are located at \"HHH\"?", "sql": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04293", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of clubs located at \"HHH\".", "sql": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04294", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first and last name of the president of the club \"Bootup Baltimore\"?", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04295", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04296", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04297", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?", "sql": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04298", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many different roles are there in the club \"Bootup Baltimore\"?", "sql": "SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04299", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of different positions in the club \"Bootup Baltimore\".", "sql": "SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04300", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many members of \"Bootup Baltimore\" are older than 18?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04301", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of members in club \"Bootup Baltimore\" whose age is above 18.", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04302", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many members of club \"Bootup Baltimore\" are younger than 18?", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04303", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of members in club \"Bootup Baltimore\" whose age is below 18.", "sql": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04304", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04305", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04306", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the names of the clubs that have at least a member from the city with city code \"HOU\".", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04307", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04308", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many clubs does the student named \"Eric Tai\" belong to?", "sql": "SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04309", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of clubs for which the student named \"Eric Tai\" is a member.", "sql": "SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04310", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List the clubs having \"Davis Steven\" as a member.", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04311", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the clubs that have \"Davis Steven\" as a member?", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04312", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List the clubs that have at least a member with advisor \"1121\".", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04313", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which clubs have one or more members whose advisor is \"1121\"?", "sql": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04314", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average age of the members of the club \"Bootup Baltimore\"?", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04315", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of the members in the club \"Bootup Baltimore\".", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04316", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of members of the club \"Hopkins Student Enterprises\".", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04317", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04318", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Retrieve the average age of members of the club \"Tennis Club\".", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04319", "db_id": "club_1", "schema_text": "CREATE TABLE Club (ClubID BIGINT, ClubName VARCHAR /* e.g. 'Bootup Baltimore', 'Hopkins Student Enterprises' */, ClubDesc VARCHAR /* e.g. 'A competitive tennis club.', 'Play pen and paper games on campus.' */, ClubLocation VARCHAR /* e.g. 'AKW', 'HHH' */);\nCREATE TABLE Member_of_club (StuID BIGINT, ClubID BIGINT, Position VARCHAR /* e.g. 'CTO', 'President' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Compute the average age of the members in the club \"Tennis Club\".", "sql": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04320", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?", "sql": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04321", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?", "sql": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04322", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the project details of the project both producing patent and paper as outcomes.", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04323", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details of the project that is producing both patents and papers as outcomes?", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04324", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the total grant amount of the organisations described as research?", "sql": "SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04325", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the total amount of grant money for research?", "sql": "SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04326", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List from which date and to which date these staff work: project staff of the project which hires the most staffs", "sql": "SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04327", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?", "sql": "SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04328", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Find the organisation ids and details of the organisations which are involved in", "sql": "SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id, T2.organisation_details HAVING SUM(T1.grant_amount) > 6000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04329", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the ids and details for all organizations that have grants of more than 6000 dollars?", "sql": "SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id, T2.organisation_details HAVING SUM(T1.grant_amount) > 6000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04330", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the organisation type and id of the organisation which has the most number of research staff?", "sql": "SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id, T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04331", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the type and id of the organization that has the most research staff?", "sql": "SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id, T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04332", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Which organisation type hires most research staff?", "sql": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04333", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the type of the organization with the most research staff?", "sql": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04334", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described", "sql": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04335", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?", "sql": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04336", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?", "sql": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04337", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the response received date for the document described as Regular that was granted more than 100 dollars?", "sql": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04338", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the project details of the projects which did not hire any staff for a researcher role.", "sql": "SELECT project_details FROM Projects WHERE project_id NOT IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04339", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details for all projects that did not hire any staff in a research role?", "sql": "SELECT project_details FROM Projects WHERE project_id NOT IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04340", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?", "sql": "SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id, T1.task_details, T1.task_id HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04341", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?", "sql": "SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id, T1.task_details, T1.task_id HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04342", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "When do all the researcher role staff start to work, and when do they stop working?", "sql": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04343", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "When did researchers start and stop working?", "sql": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04344", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many kinds of roles are there for the staff?", "sql": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04345", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many different roles are there on the project staff?", "sql": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04346", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the total amount of grants given by each organisations? Also list the organisation id.", "sql": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04347", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the total amount of grant money given to each organization and what is its id?", "sql": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04348", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the project details of the projects with the research outcome described with the substring 'Published'.", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description ILIKE '%Published%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04349", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details for the project whose research has been published?", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description ILIKE '%Published%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04350", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many staff does each project has? List the project id and the number in an ascending order.", "sql": "SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04351", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For each project id, how many staff does it have? List them in increasing order.", "sql": "SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04352", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the complete description of the researcher role.", "sql": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04353", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the complete description of the job of a researcher?", "sql": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04354", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "When did the first staff for the projects started working?", "sql": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04355", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "When did the first staff member start working?", "sql": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04356", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Which project made the most number of outcomes? List the project details and the project id.", "sql": "SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04357", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details and id of the project with the most outcomes?", "sql": "SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04358", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Which projects have no outcome? List the project details.", "sql": "SELECT project_details FROM Projects WHERE project_id NOT IN (SELECT project_id FROM Project_outcomes);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04359", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details of the project with no outcomes?", "sql": "SELECT project_details FROM Projects WHERE project_id NOT IN (SELECT project_id FROM Project_outcomes);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04362", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Show the role description and the id of the project staff involved in most number of project outcomes?", "sql": "SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id, T1.role_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04363", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For each staff id, what is the description of the role that is involved with the most number of projects?", "sql": "SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id, T1.role_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04364", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Which document type is described with the prefix 'Initial'?", "sql": "SELECT document_type_code FROM Document_Types WHERE document_description ILIKE 'Initial%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04365", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the type of the document whose description starts with the word 'Initial'?", "sql": "SELECT document_type_code FROM Document_Types WHERE document_description ILIKE 'Initial%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04366", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.", "sql": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04367", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?", "sql": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04368", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many documents can one grant have at most? List the grant id and number.", "sql": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04369", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For each grant id, how many documents does it have, and which one has the most?", "sql": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04370", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Find the organisation type description of the organisation detailed as 'quo'.", "sql": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04371", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the type description of the organization whose detail is listed as 'quo'?", "sql": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04372", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.", "sql": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04373", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?", "sql": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04374", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many Patent outcomes are generated from all the projects?", "sql": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04375", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many patents outcomes were listed for all the projects?", "sql": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04376", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?", "sql": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04377", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many project members were leaders or started working before '1989-04-24 23:51:54'?", "sql": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04378", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the last date of the staff leaving the projects?", "sql": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04379", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the last date that a staff member left a project?", "sql": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04380", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the result description of the project whose detail is 'sint'?", "sql": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04381", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the description for the results whose project detail is 'sint'?", "sql": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04382", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the organisation id with the maximum outcome count, and the count.", "sql": "SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04383", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?", "sql": "SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04384", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the project details of the projects launched by the organisation", "sql": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04385", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the details for the projects which were launched by the organization with the most projects?", "sql": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04386", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the research staff details, and order in ascending order.", "sql": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04387", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What details are there on the research staff? List the result in ascending alphabetical order.", "sql": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04388", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many tasks are there in total?", "sql": "SELECT COUNT(*) FROM Tasks;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04389", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many tasks are there?", "sql": "SELECT COUNT(*) FROM Tasks;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04390", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "How many tasks does each project have? List the task count and the project detail.", "sql": "SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04391", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "For each project id, how many tasks are there?", "sql": "SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04392", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the staff roles of the staff who", "sql": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04393", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?", "sql": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04394", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What are the descriptions of all the project outcomes?", "sql": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04395", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "List the description of the outcomes for all projects.", "sql": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04396", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "Which role is most common for the staff?", "sql": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04397", "db_id": "tracking_grants_for_research", "schema_text": "CREATE TABLE Document_Types (document_type_code VARCHAR /* e.g. 'APP', 'REG' */, document_description VARCHAR /* e.g. 'Initial Application', 'Regular' */);\nCREATE TABLE Documents (document_id BIGINT, document_type_code VARCHAR /* e.g. 'APP', 'REG' */, grant_id BIGINT, sent_date TIMESTAMP, response_received_date TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Grants (grant_id BIGINT, organisation_id BIGINT, grant_amount DOUBLE, grant_start_date TIMESTAMP, grant_end_date TIMESTAMP, other_details VARCHAR /* e.g. 'et', 'aliquam' */);\nCREATE TABLE Organisation_Types (organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_type_description VARCHAR /* e.g. 'Research', 'Sponsor' */);\nCREATE TABLE Organisations (organisation_id BIGINT, organisation_type VARCHAR /* e.g. 'RES', 'SPON' */, organisation_details VARCHAR /* e.g. 'itaque', 'a' */);\nCREATE TABLE Project_Outcomes (project_id BIGINT, outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_details VARCHAR);\nCREATE TABLE Project_Staff (staff_id DOUBLE, project_id BIGINT, role_code VARCHAR /* e.g. 'researcher', 'leader' */, date_from TIMESTAMP, date_to TIMESTAMP, other_details VARCHAR);\nCREATE TABLE Projects (project_id BIGINT, organisation_id BIGINT, project_details VARCHAR /* e.g. 'ad', 'beatae' */);\nCREATE TABLE Research_Outcomes (outcome_code VARCHAR /* e.g. 'Paper', 'Patent' */, outcome_description VARCHAR /* e.g. 'Published Research Paper', 'Research Patent' */);\nCREATE TABLE Research_Staff (staff_id BIGINT, employer_organisation_id BIGINT, staff_details VARCHAR /* e.g. 'consequatur', 'ab' */);\nCREATE TABLE Staff_Roles (role_code VARCHAR /* e.g. 'leader', 'researcher' */, role_description VARCHAR /* e.g. 'Project Leader', 'Project Researcher' */);\nCREATE TABLE Tasks (task_id BIGINT, project_id BIGINT, task_details VARCHAR /* e.g. 'a', 'b' */, \"eg Agree Objectives\" VARCHAR);", "question": "What is the most common role for the staff?", "sql": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04398", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many friends does Dan have?", "sql": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04400", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many females does this network has?", "sql": "SELECT COUNT(*) FROM Person WHERE gender = 'female';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04401", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many females are in the network?", "sql": "SELECT COUNT(*) FROM Person WHERE gender = 'female';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04402", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the average age for all person?", "sql": "SELECT AVG(age) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04403", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the average age for all people in the table?", "sql": "SELECT AVG(age) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04404", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many different cities are they from?", "sql": "SELECT COUNT(DISTINCT city) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04405", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many different cities do people originate from?", "sql": "SELECT COUNT(DISTINCT city) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04406", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many type of jobs do they have?", "sql": "SELECT COUNT(DISTINCT job) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04407", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many different jobs are listed?", "sql": "SELECT COUNT(DISTINCT job) FROM Person;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04408", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the oldest person?", "sql": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04409", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of the person who is the oldest?", "sql": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04410", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the oldest person whose job is student?", "sql": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04411", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of the oldest student?", "sql": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04412", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the youngest male?", "sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04413", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of the youngest male?", "sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04414", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How old is the doctor named Zach?", "sql": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04415", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the age of the doctor named Zach?", "sql": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04416", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the person whose age is below 30?", "sql": "SELECT name FROM Person WHERE age < 30;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04417", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of the person whose age is below 30?", "sql": "SELECT name FROM Person WHERE age < 30;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04418", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many people whose age is greater 30 and job is engineer?", "sql": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04419", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "HOw many engineers are older than 30?", "sql": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04420", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the average age for each gender?", "sql": "SELECT AVG(age), gender FROM Person GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04421", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How old is each gender, on average?", "sql": "SELECT AVG(age), gender FROM Person GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04422", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is average age for different job title?", "sql": "SELECT AVG(age), job FROM Person GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04423", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How old is the average person for each job?", "sql": "SELECT AVG(age), job FROM Person GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04424", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is average age of male for different job title?", "sql": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04425", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the average age for a male in each job?", "sql": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04426", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is minimum age for different job title?", "sql": "SELECT MIN(age), job FROM Person GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04427", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How old is the youngest person for each job?", "sql": "SELECT MIN(age), job FROM Person GROUP BY job;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04428", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the number of people who is under 40 for each gender.", "sql": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04429", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many people are under 40 for each gender?", "sql": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04430", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of people whose age is greater than any engineer sorted by their age.", "sql": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04431", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of all the people who are older than at least one engineer? Order them by age.", "sql": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04432", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the number of people whose age is greater than all engineers.", "sql": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04433", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "How many people are older than every engineer?", "sql": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04434", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "list the name, job title of all people ordered by their names.", "sql": "SELECT name, job FROM Person ORDER BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04435", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names and job titles of every person ordered alphabetically by name?", "sql": "SELECT name, job FROM Person ORDER BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04436", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the names of all person sorted in the descending order using age.", "sql": "SELECT name FROM Person ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04437", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of everybody sorted by age in descending order?", "sql": "SELECT name FROM Person ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04438", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name and age of all males in order of their age.", "sql": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04439", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name and age of every male? Order the results by age.", "sql": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04440", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name and age of the person who is a friend of both Dan and Alice.", "sql": "SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04441", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names and ages of every person who is a friend of both Dan and Alice?", "sql": "SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04442", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name and age of the person who is a friend of Dan or Alice.", "sql": "SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04443", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the different names and ages of every friend of either Dan or alice?", "sql": "SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04444", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of the person who has friends with age above 40 and under age 30?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04445", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of every person who has a friend over 40 and under 30?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04446", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of the person who has friends with age above 40 but not under age 30?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04447", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of the people who are older 40 but no friends under age 30?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04448", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of the person who has no student friends.", "sql": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04449", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of the people who have no friends who are students?", "sql": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04450", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the person who has exactly one friend.", "sql": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04451", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of everybody who has exactly one friend?", "sql": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04452", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who are the friends of Bob?", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04453", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who are Bob's friends?", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04454", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of persons who are friends with Bob.", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04455", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all of Bob's friends?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04456", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the names of females who are friends with Zach", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04457", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all females who are friends with Zach?", "sql": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04458", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the female friends of Alice.", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04459", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are all the friends of Alice who are female?", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04460", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the male friend of Alice whose job is a doctor?", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04461", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who are the friends of Alice that are doctors?", "sql": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04462", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who has a friend that is from new york city?", "sql": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04463", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all friends who are from New York?", "sql": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04464", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who has friends that are younger than the average age?", "sql": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04465", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the different names of friends who are younger than the average age for a friend?", "sql": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04466", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who has friends that are older than the average age? Print their friends and their ages as well", "sql": "SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04467", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Whare the names, friends, and ages of all people who are older than the average age of a person?", "sql": "SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04468", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the friend of Zach with longest year relationship?", "sql": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04469", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Which friend of Zach has the longest-lasting friendship?", "sql": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04470", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the age of the friend of Zach with longest year relationship?", "sql": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04471", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the ages of all of Zach's friends who are in the longest relationship?", "sql": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04472", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name of persons who are friends with Alice for the shortest years.", "sql": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04473", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all people who are friends with Alice for the shortest amount of time?", "sql": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04474", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find the name, age, and job title of persons who are friends with Alice for the longest years.", "sql": "SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04475", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?", "sql": "SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04476", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Who is the person that has no friend?", "sql": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04477", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all people who do not have friends?", "sql": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04478", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Which person whose friends have the oldest average age?", "sql": "SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04479", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the name of the person who has the oldest average age for their friends, and what is that average age?", "sql": "SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04480", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the total number of people who has no friend living in the city of Austin.", "sql": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04481", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What is the total number of people who have no friends living in Austin?", "sql": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04482", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "Find Alice's friends of friends.", "sql": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04483", "db_id": "network_2", "schema_text": "CREATE TABLE Person (name VARCHAR /* e.g. 'Alice', 'Bob' */, age BIGINT, city VARCHAR /* e.g. 'austin', 'chicago' */, gender VARCHAR /* e.g. 'female', 'male' */, job VARCHAR /* e.g. 'student', 'doctor' */);\nCREATE TABLE PersonFriend (name VARCHAR /* e.g. 'Zach', 'Alice' */, friend VARCHAR /* e.g. 'Alice', 'Bob' */, year BIGINT);", "question": "What are the names of all of Alice's friends of friends?", "sql": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04484", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "How many members are there?", "sql": "SELECT COUNT(*) FROM member;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04485", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "List the names of members in ascending alphabetical order.", "sql": "SELECT Name FROM member ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04486", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "What are the names and countries of members?", "sql": "SELECT Name, Country FROM member;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04487", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members whose country is \"United States\" or \"Canada\".", "sql": "SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04488", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the different countries and the number of members from each.", "sql": "SELECT Country, COUNT(*) FROM member GROUP BY Country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04489", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the most common country across members.", "sql": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04490", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Which countries have more than two members?", "sql": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04491", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the leader names and locations of colleges.", "sql": "SELECT Leader_Name, College_Location FROM college;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04492", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members and names of colleges they go to.", "sql": "SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04493", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.", "sql": "SELECT T2.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04494", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the distinct leader names of colleges associated with members from country \"Canada\".", "sql": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04495", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members and the decoration themes they have.", "sql": "SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04496", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members that have a rank in round higher than 3.", "sql": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04497", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "Show the names of members in ascending order of their rank in rounds.", "sql": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04498", "db_id": "decoration_competition", "schema_text": "CREATE TABLE college (College_ID BIGINT, Name VARCHAR /* e.g. 'B.C. School', 'Calgary School' */, Leader_Name VARCHAR /* e.g. 'Andre Arlain', 'Ousame Tounkara' */, College_Location VARCHAR /* e.g. 'McGill', 'Minnesota' */);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Arnold Palmer', 'Billy Casper' */, Country VARCHAR /* e.g. 'United States', 'Canada' */, College_ID BIGINT);\nCREATE TABLE round (Round_ID BIGINT, Member_ID BIGINT, Decoration_Theme VARCHAR /* e.g. 'Dark Nights', 'Happiness' */, Rank_in_Round BIGINT);", "question": "List the names of members who did not participate in any round.", "sql": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04499", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the name and access counts of all documents, in alphabetic order of the document name.", "sql": "SELECT document_name, access_count FROM documents ORDER BY document_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04500", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?", "sql": "SELECT document_name, access_count FROM documents ORDER BY document_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04501", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?", "sql": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04502", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?", "sql": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04503", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the types of documents with more than 4 documents.", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04504", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the codes of types of documents of which there are for or more?", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04505", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the total access count of all documents in the most popular document type.", "sql": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04506", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the total access count of documents that are of the most common document type?", "sql": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04507", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the average access count of documents?", "sql": "SELECT AVG(access_count) FROM documents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04508", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the average access count across all documents?", "sql": "SELECT AVG(access_count) FROM documents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04509", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the structure of the document with the least number of accesses?", "sql": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code, t2.document_structure_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04510", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Return the structure description of the document that has been accessed the fewest number of times.", "sql": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code, t2.document_structure_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04511", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the type of the document named \"David CV\"?", "sql": "SELECT document_type_code FROM documents WHERE document_name = 'David CV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04512", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Return the type code of the document named \"David CV\".", "sql": "SELECT document_type_code FROM documents WHERE document_name = 'David CV';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04515", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What document types do have more than 10000 total access number.", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04516", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Return the codes of the document types that do not have a total access count of over 10000.", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04517", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are all the section titles of the document named \"David CV\"?", "sql": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04518", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Give the section titles of the document with the name \"David CV\".", "sql": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04519", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find all the name of documents without any sections.", "sql": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04520", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the names of documents that do not have any sections?", "sql": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04523", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the average access counts of documents with functional area \"Acknowledgement\".", "sql": "SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04524", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the average access counts of documents that have the functional area description \"Acknowledgement\"?", "sql": "SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04525", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find names of the document without any images.", "sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04526", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the names of documents that do not have any images?", "sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04529", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "List all the document names which contains \"CV\".", "sql": "SELECT document_name FROM documents WHERE document_name ILIKE '%CV%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04530", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the names of documents that contain the substring \"CV\"?", "sql": "SELECT document_name FROM documents WHERE document_name ILIKE '%CV%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04531", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "How many users are logged in?", "sql": "SELECT COUNT(*) FROM users WHERE user_login = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04532", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Count the number of users that are logged in.", "sql": "SELECT COUNT(*) FROM users WHERE user_login = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04533", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the description of the most popular role among the users that have logged in.", "sql": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04534", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the description of the most popular role among users that have logged in?", "sql": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04535", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the average access count of documents with the least popular structure.", "sql": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04536", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What is the average access count of documents that have the least common structure?", "sql": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04537", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "List all the image name and URLs in the order of their names.", "sql": "SELECT image_name, image_url FROM images ORDER BY image_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04538", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the names and urls of images, sorted alphabetically?", "sql": "SELECT image_name, image_url FROM images ORDER BY image_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04539", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Find the number of users in each role.", "sql": "SELECT COUNT(*), role_code FROM users GROUP BY role_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04540", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What are the different role codes for users, and how many users have each?", "sql": "SELECT COUNT(*), role_code FROM users GROUP BY role_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04541", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "What document types have more than 2 corresponding documents?", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04542", "db_id": "document_management", "schema_text": "CREATE TABLE Document_Functional_Areas (document_code BIGINT, functional_area_code BIGINT);\nCREATE TABLE Document_Sections (section_id BIGINT, document_code BIGINT, section_sequence BIGINT, section_code BIGINT, section_title VARCHAR /* e.g. 'after', 'before' */);\nCREATE TABLE Document_Sections_Images (section_id BIGINT, image_id BIGINT);\nCREATE TABLE Document_Structures (document_structure_code BIGINT, parent_document_structure_code BIGINT, document_structure_description VARCHAR /* e.g. 'Author section', 'Bib' */);\nCREATE TABLE Documents (document_code BIGINT, document_structure_code BIGINT, document_type_code VARCHAR /* e.g. 'Book', 'Advertisement' */, access_count BIGINT, document_name VARCHAR /* e.g. 'David CV', 'Fall Sails' */);\nCREATE TABLE Functional_Areas (functional_area_code BIGINT, parent_functional_area_code BIGINT, functional_area_description VARCHAR /* e.g. 'Acknowledgement', 'Keep blank' */);\nCREATE TABLE Images (image_id BIGINT, image_alt_text VARCHAR /* e.g. 'Arden', 'Ashtyn' */, image_name VARCHAR /* e.g. 'chapter1', 'chapter2' */, image_url VARCHAR /* e.g. 'http://abernathyboehm.com/1.jpg', 'http://andersonluettgen.net/1.jpg' */);\nCREATE TABLE Roles (role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, role_description VARCHAR /* e.g. 'Database Administrator', 'Project Manager' */);\nCREATE TABLE Users (user_id BIGINT, role_code VARCHAR /* e.g. 'DBA', 'PROJ-MGR' */, user_name VARCHAR /* e.g. 'amelie53', 'dickens.elta' */, user_login BIGINT, password VARCHAR /* e.g. '11af7569a5c1e8b455add5755e18131be2ac8636', '1fb26eea854962d41512827bf90a5b7ce4b359d8' */);", "question": "Give the codes of document types that have more than 2 corresponding documents.", "sql": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04543", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "How many companies are there?", "sql": "SELECT COUNT(*) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04544", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Count the number of companies.", "sql": "SELECT COUNT(*) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04547", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What are the names of companies whose headquarters are not \"USA\"?", "sql": "SELECT name FROM Companies WHERE Headquarters <> 'USA';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04548", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Find the names of the companies whose headquarters are not located in \"USA\".", "sql": "SELECT name FROM Companies WHERE Headquarters <> 'USA';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04549", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What are the name and assets of each company, sorted in ascending order of company name?", "sql": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04550", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "List the name and assets of each company in ascending order of company name.", "sql": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04551", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What are the average profits of companies?", "sql": "SELECT AVG(Profits_billion) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04552", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Compute the average profits companies make.", "sql": "SELECT AVG(Profits_billion) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04553", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What are the maximum and minimum sales of the companies whose industries are not \"Banking\".", "sql": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04554", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry.", "sql": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04555", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "How many different industries are the companies in?", "sql": "SELECT COUNT(DISTINCT Industry) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04556", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Count the number of distinct company industries.", "sql": "SELECT COUNT(DISTINCT Industry) FROM Companies;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04557", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "List the names of buildings in descending order of building height.", "sql": "SELECT name FROM buildings ORDER BY Height DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04558", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What are the names of buildings sorted in descending order of building height?", "sql": "SELECT name FROM buildings ORDER BY Height DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04559", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Find the stories of the building with the largest height.", "sql": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04560", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "What is the stories of highest building?", "sql": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04561", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "List the name of a building along with the name of a company whose office is in the building.", "sql": "SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04562", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "For each company, return the company name and the name of the building its office is located in.", "sql": "SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04563", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Show the names of the buildings that have more than one company offices.", "sql": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id, T2.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04564", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which buildings have more than one company offices? Give me the building names.", "sql": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id, T2.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04565", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Show the name of the building that has the most company offices.", "sql": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04566", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which building has the largest number of company offices? Give me the building name.", "sql": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04567", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories.", "sql": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04568", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories.", "sql": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04569", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Please show each industry and the corresponding number of companies in that industry.", "sql": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04570", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Whah are the name of each industry and the number of companies in that industry?", "sql": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04571", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Please show the industries of companies in descending order of the number of companies.", "sql": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04572", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Sort all the industries in descending order of the count of companies in each industry", "sql": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04573", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "List the industry shared by the most companies.", "sql": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04574", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which industry has the most companies?", "sql": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04575", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "List the names of buildings that have no company office.", "sql": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04576", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which buildings do not have any company office? Give me the building names.", "sql": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04577", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\".", "sql": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04578", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"?", "sql": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04579", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",", "sql": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04580", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?", "sql": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04581", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Show the headquarters shared by more than two companies.", "sql": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04582", "db_id": "company_office", "schema_text": "CREATE TABLE buildings (id BIGINT, name VARCHAR /* e.g. 'Corporativo BBVA Bancomer', 'LIU East' */, City VARCHAR /* e.g. 'Mexico City', 'Monterrey' */, Height BIGINT, Stories BIGINT, Status VARCHAR /* e.g. 'under construction', 'on-hold' */);\nCREATE TABLE Companies (id BIGINT, name VARCHAR /* e.g. 'AT&T Inc.', 'BNP Paribas' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Banking', 'Oil and gas' */, Sales_billion DOUBLE, Profits_billion DOUBLE, Assets_billion DOUBLE, Market_Value_billion DOUBLE);\nCREATE TABLE Office_locations (building_id BIGINT, company_id BIGINT, move_in_year BIGINT);", "question": "Which headquarter locations are used by more than 2 companies?", "sql": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04583", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "How many products are there?", "sql": "SELECT COUNT(*) FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04584", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "List the name of products in ascending order of price.", "sql": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04585", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "What are the names and type codes of products?", "sql": "SELECT Product_Name, Product_Type_Code FROM Products;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04586", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the prices of the products named \"Dining\" or \"Trading Policy\".", "sql": "SELECT Product_Price FROM Products WHERE Product_Name = 'Dining' OR Product_Name = 'Trading Policy';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04587", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "What is the average price for products?", "sql": "SELECT AVG(Product_Price) FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04588", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "What is the name of the product with the highest price?", "sql": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04589", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show different type codes of products and the number of products with each type code.", "sql": "SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04590", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the most common type code across products.", "sql": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04591", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the product type codes that have at least two products.", "sql": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04592", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.", "sql": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04593", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the names of products and the number of events they are in.", "sql": "SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04595", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the names of products that are in at least two events.", "sql": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04596", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "Show the names of products that are in at least two events in ascending alphabetical order of product name.", "sql": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04597", "db_id": "solvency_ii", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, address_details VARCHAR);\nCREATE TABLE Agreements (Document_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Assets (Asset_ID BIGINT, Other_Details VARCHAR /* e.g. 'Dinning Tables', 'Meeting Rooms' */);\nCREATE TABLE Assets_in_Events (Asset_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE Channels (Channel_ID BIGINT, Other_Details VARCHAR /* e.g. '058', '145' */);\nCREATE TABLE Events (Event_ID BIGINT, Address_ID BIGINT, Channel_ID BIGINT, Event_Type_Code VARCHAR /* e.g. 'Trade Show', 'Press Conferenc' */, Finance_ID BIGINT, Location_ID BIGINT);\nCREATE TABLE Finances (Finance_ID BIGINT, Other_Details VARCHAR /* e.g. 'Mutual', 'Good' */);\nCREATE TABLE Locations (Location_ID BIGINT, Other_Details VARCHAR /* e.g. 'Daugherty, Nader and Balistreri', 'Ebert, Green and Bogisich' */);\nCREATE TABLE Parties (Party_ID BIGINT, Party_Details VARCHAR /* e.g. 'EUDemocrats', 'European Alliance for Freedom' */);\nCREATE TABLE Parties_in_Events (Party_ID BIGINT, Event_ID BIGINT, Role_Code VARCHAR /* e.g. 'Organizer', 'Participant' */);\nCREATE TABLE Products (Product_ID BIGINT, Product_Type_Code VARCHAR /* e.g. 'Food', 'Books' */, Product_Name VARCHAR /* e.g. 'Dinning', 'TV Equipments' */, Product_Price DOUBLE);\nCREATE TABLE Products_in_Events (Product_in_Event_ID BIGINT, Event_ID BIGINT, Product_ID BIGINT);", "question": "List the names of products that are not in any event.", "sql": "SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04598", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "How many artworks are there?", "sql": "SELECT COUNT(*) FROM artwork;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04599", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of artworks in ascending alphabetical order.", "sql": "SELECT Name FROM artwork ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04600", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of artworks whose type is not \"Program Talent Show\".", "sql": "SELECT Name FROM artwork WHERE TYPE <> 'Program Talent Show';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04601", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names and locations of festivals?", "sql": "SELECT Festival_Name, LOCATION FROM festival_detail;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04602", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of the chairs of festivals, sorted in ascending order of the year held?", "sql": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04603", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What is the location of the festival with the largest number of audience?", "sql": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04604", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the names of festivals held in year 2007?", "sql": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04605", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What is the average number of audience for festivals?", "sql": "SELECT AVG(Num_of_Audience) FROM festival_detail;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04607", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "For each nomination, show the name of the artwork and name of the festival where it is nominated.", "sql": "SELECT T2.Name, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04608", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show distinct types of artworks that are nominated in festivals in 2007.", "sql": "SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04609", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the names of artworks in ascending order of the year they are nominated in.", "sql": "SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04610", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the names of festivals that have nominated artworks of type \"Program Talent Show\".", "sql": "SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = 'Program Talent Show';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04611", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the ids and names of festivals that have at least two nominations for artworks.", "sql": "SELECT T1.Festival_ID, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID, T3.Festival_Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04612", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the id, name of each festival and the number of artworks it has nominated.", "sql": "SELECT T1.Festival_ID, T3.Festival_Name, COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID, T3.Festival_Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04613", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Please show different types of artworks with the corresponding number of artworks of each type.", "sql": "SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04614", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the most common type of artworks.", "sql": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04615", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the year in which there are more than one festivals.", "sql": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04616", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "List the name of artworks that are not nominated.", "sql": "SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04617", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "Show the number of audience in year 2008 or 2010.", "sql": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04618", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "What are the total number of the audiences who visited any of the festivals?", "sql": "SELECT SUM(Num_of_Audience) FROM festival_detail;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04619", "db_id": "entertainment_awards", "schema_text": "CREATE TABLE artwork (Artwork_ID BIGINT, Type VARCHAR /* e.g. 'Program Music/Variety Show', 'Presenter Music/Variety Show' */, Name VARCHAR /* e.g. 'Back Home', 'Boys' */);\nCREATE TABLE festival_detail (Festival_ID BIGINT, Festival_Name VARCHAR /* e.g. 'Cherry Awards', 'Flower Awards' */, Chair_Name VARCHAR /* e.g. 'Arnold Palmer', 'Charles Coody' */, Location VARCHAR /* e.g. 'United States' */, Year BIGINT, Num_of_Audience BIGINT);\nCREATE TABLE nomination (Artwork_ID BIGINT, Festival_ID BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Won' */);", "question": "In which year are there festivals both inside the 'United States' and outside the 'United States'?", "sql": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION <> 'United States';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04620", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "How many premises are there?", "sql": "SELECT COUNT(*) FROM premises;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04621", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "What are all the distinct premise types?", "sql": "SELECT DISTINCT premises_type FROM premises;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04622", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Find the types and details for all premises and order by the premise type.", "sql": "SELECT premises_type, premise_details FROM premises ORDER BY premises_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04623", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show each premise type and the number of premises in that type.", "sql": "SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04624", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show all distinct product categories along with the number of mailshots in each category.", "sql": "SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04625", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the name and phone of the customer without any mailshot.", "sql": "SELECT customer_name, customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM mailshot_customers);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04626", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.", "sql": "SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04627", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.", "sql": "SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04628", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.", "sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE outcome_code = 'Order' GROUP BY T1.customer_id, T2.customer_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04629", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the names of customers who have the most mailshots.", "sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.customer_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04630", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.", "sql": "SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04631", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the premise type and address type code for all customer addresses.", "sql": "SELECT T2.premises_type, T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04632", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "What are the distinct address type codes for all customer addresses?", "sql": "SELECT DISTINCT address_type_code FROM customer_addresses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04633", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.", "sql": "SELECT order_shipping_charges, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04634", "db_id": "customers_campaigns_ecommerce", "schema_text": "CREATE TABLE Customer_Addresses (customer_id BIGINT, premise_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Shipping' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Cancelled', 'Paid' */, shipping_method_code VARCHAR /* e.g. 'Unspecified', 'FedEx' */, order_placed_datetime TIMESTAMP, order_delivered_datetime TIMESTAMP, order_shipping_charges DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Annabel', 'Carlotta' */, customer_phone VARCHAR /* e.g. '(030)521-0681x0191', '(402)890-2603x6005' */, customer_email VARCHAR /* e.g. 'davis.rosamond@example.net', 'elva.mccullough@example.org' */, customer_address VARCHAR /* e.g. '0260 Walker Trace', '056 Ibrahim Path Suite 669' */, customer_login VARCHAR, customer_password VARCHAR /* e.g. '0b9f651030', '22dc8bfaf5' */);\nCREATE TABLE Mailshot_Campaigns (mailshot_id BIGINT, product_category VARCHAR /* e.g. 'food', 'clothes' */, mailshot_name VARCHAR /* e.g. 'US', 'FED' */, mailshot_start_date TIMESTAMP, mailshot_end_date TIMESTAMP);\nCREATE TABLE Mailshot_Customers (mailshot_id BIGINT, customer_id BIGINT, outcome_code VARCHAR /* e.g. 'Order', 'No Response' */, mailshot_customer_date TIMESTAMP);\nCREATE TABLE Order_Items (item_id BIGINT, order_item_status_code VARCHAR /* e.g. 'Delivered', 'Paid' */, order_id BIGINT, product_id BIGINT, item_status_code VARCHAR /* e.g. 'good' */, item_delivered_datetime TIMESTAMP, item_order_quantity BIGINT);\nCREATE TABLE Premises (premise_id BIGINT, premises_type VARCHAR /* e.g. 'Office', 'Residence' */, premise_details VARCHAR /* e.g. '00100 Green Mountains Apt. 653', '036 Lueilwitz Harbor' */);\nCREATE TABLE Products (product_id BIGINT, product_category VARCHAR /* e.g. 'Books', 'Electronics' */, product_name VARCHAR /* e.g. 'Chocolate', 'Coffee Bean' */);", "question": "Show the names of customers having an order with shipping method FedEx and order status Paid.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04635", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many courses are there in total?", "sql": "SELECT COUNT(*) FROM COURSE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04636", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of courses.", "sql": "SELECT COUNT(*) FROM COURSE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04637", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many courses have more than 2 credits?", "sql": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04638", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of courses with more than 2 credits.", "sql": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04639", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List all names of courses with 1 credit?", "sql": "SELECT CName FROM COURSE WHERE Credits = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04640", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of courses with 1 credit?", "sql": "SELECT CName FROM COURSE WHERE Credits = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04641", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which courses are taught on days MTW?", "sql": "SELECT CName FROM COURSE WHERE Days = 'MTW';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04642", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the course names for courses taught on MTW?", "sql": "SELECT CName FROM COURSE WHERE Days = 'MTW';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04643", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the number of departments in Division \"AS\"?", "sql": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04644", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many departments are in the division AS?", "sql": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04647", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students that have at least one grade \"B\".", "sql": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04648", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students have had at least one \"B\" grade?", "sql": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04649", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the max and min grade point for all letter grade.", "sql": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04650", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the maximum and minumum grade points?", "sql": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04651", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names of students whose first names contain letter \"a\".", "sql": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04652", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names for students who have an \"a\" in their first name?", "sql": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04653", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names and last names of male (sex is M) faculties who live in building NEB.", "sql": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04654", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names of faculties with sex M and who live in building NEB?", "sql": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04655", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the rooms of faculties with rank professor who live in building NEB.", "sql": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04656", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the rooms for members of the faculty who are professors and who live in building NEB?", "sql": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04657", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the department name that is in Building \"Mergenthaler\".", "sql": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04658", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the department in the Building Mergenthaler?", "sql": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04665", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the last name of female (sex is F) students in the descending order of age.", "sql": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04666", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the last names of female students, ordered by age descending?", "sql": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04667", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the last names of faculties in building Barton in alphabetic order.", "sql": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04668", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the last names of faculty in building Barton, sorted by last name?", "sql": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04669", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names of faculties of rank Professor in alphabetic order.", "sql": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04670", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names for all faculty professors, ordered by first name?", "sql": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04671", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of the department that has the biggest number of students minored in?", "sql": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO, T1.DName ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04672", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the department with the most students minoring in it?", "sql": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO, T1.DName ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04673", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of the department that has no students minored in?", "sql": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04674", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the department htat has no students minoring in it?", "sql": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04675", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of the department that has the fewest members.", "sql": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO, T1.DName ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04676", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the department with the fewest members?", "sql": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO, T1.DName ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04683", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the name of courses that have at least five enrollments?", "sql": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID, T1.CName HAVING COUNT(*) >= 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04684", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give the names of the courses with at least five enrollments.", "sql": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID, T1.CName HAVING COUNT(*) >= 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04685", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name and last name of the instructor of course that has course name", "sql": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04686", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the full name of the instructor who has a course named COMPUTER LITERACY?", "sql": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04687", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.", "sql": "SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04688", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", "sql": "SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04689", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the student first and last names and grade points of all enrollments.", "sql": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04690", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names and gradepoints for all enrollments?", "sql": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04691", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.", "sql": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04692", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?", "sql": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04693", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the full names of faculties who are members of department with department number 520.", "sql": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04694", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names of faculty members who are a part of department 520?", "sql": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04695", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names and last names of the students that minor in the department with DNO 140.", "sql": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04696", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the full names of students minoring in department 140?", "sql": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04699", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average grade point of student whose last name is Smith.", "sql": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04700", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average gradepoint for students with the last name Smith?", "sql": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04701", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the maximum and minimum grade point of students who live in NYC?", "sql": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04702", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give the maximum and minimum gradepoints for students living in NYC?", "sql": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 ON TRUE JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04705", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the names of departments that are either in division AS or in division EN and in Building NEB.", "sql": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04706", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of departments either in division AS, or in division EN and in building NEB?", "sql": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04707", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name of students not enrolled in any course.", "sql": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04708", "db_id": "college_3", "schema_text": "CREATE TABLE Course (CID VARCHAR, CName VARCHAR, Credits BIGINT, Instructor BIGINT, Days VARCHAR /* e.g. 'MTW', 'ThF' */, Hours VARCHAR, DNO BIGINT);\nCREATE TABLE Department (DNO BIGINT, Division VARCHAR /* e.g. 'AS', 'EN' */, DName VARCHAR, Room VARCHAR, Building VARCHAR /* e.g. 'Gilman', 'Mergenthaler' */, DPhone BIGINT);\nCREATE TABLE Enrolled_in (StuID BIGINT, CID VARCHAR, Grade VARCHAR /* e.g. 'B', 'A' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Gradeconversion (lettergrade VARCHAR /* e.g. 'A', 'A+' */, gradepoint DOUBLE);\nCREATE TABLE Member_of (FacID BIGINT, DNO BIGINT, Appt_Type VARCHAR /* e.g. 'Primary', 'Secondary' */);\nCREATE TABLE Minor_in (StuID BIGINT, DNO BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of all students that are not enrolled in courses?", "sql": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04709", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids of the top three products that were purchased in the largest amount?", "sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04710", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give the ids of the three products purchased in the largest amounts.", "sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04711", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the product id and product type of the cheapest product?", "sql": "SELECT product_id, product_type_code FROM products ORDER BY product_price LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04712", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give the id and product type of the product with the lowest price.", "sql": "SELECT product_id, product_type_code FROM products ORDER BY product_price LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04713", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the number of different product types.", "sql": "SELECT COUNT(DISTINCT product_type_code) FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04714", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Count the number of distinct product types.", "sql": "SELECT COUNT(DISTINCT product_type_code) FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04715", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the address of customer 10.", "sql": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04716", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the address for the customer with id 10?", "sql": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04717", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the staff ids and genders of all staffs whose job title is Department Manager?", "sql": "SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04718", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the staff ids and genders for any staff with the title Department Manager.", "sql": "SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04719", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "For each payment method, return how many customers use it.", "sql": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04720", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "How many customers use each payment method?", "sql": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04721", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the id of the product that was ordered the most often?", "sql": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04722", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give the product id for the product that was ordered most frequently.", "sql": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04723", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the name, phone number and email address of the customer who made the largest number of orders?", "sql": "SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T1.customer_name, T1.customer_phone, T1.customer_email ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04724", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the name, phone number and email address for the customer with the most orders.", "sql": "SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T1.customer_name, T1.customer_phone, T1.customer_email ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04725", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the average price for each type of product?", "sql": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04726", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the average price for each product type.", "sql": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04727", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "How many department stores does the store chain South have?", "sql": "SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04728", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Count the number of stores the chain South has.", "sql": "SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04729", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the name and job title of the staff who was assigned the latest?", "sql": "SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04730", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the name and job title of the staff with the latest date assigned.", "sql": "SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04731", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give me the product type, name and price for all the products supplied by supplier id 3.", "sql": "SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04732", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the product type, name, and price for products supplied by supplier 3.", "sql": "SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04733", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the distinct name of customers whose order status is Pending, in the order of customer id.", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04734", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct names of customers with an order status of Pending, sorted by customer id?", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04735", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the name and address of the customers who have both New and Pending orders.", "sql": "SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04736", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names and addressed of customers who have both New and Pending orders?", "sql": "SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04737", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.", "sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04738", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04739", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the id and name of the department store that has both marketing and managing department?", "sql": "SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04740", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids and names of department stores with both marketing and managing departments?", "sql": "SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04741", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids of the two department store chains with the largest number of department stores?", "sql": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04742", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the ids of the two department store chains with the most department stores.", "sql": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04743", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the id of the department with the least number of staff?", "sql": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04744", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the id of the department with the fewest staff assignments.", "sql": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04745", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "For each product type, return the maximum and minimum price.", "sql": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04746", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the maximum and minimum product prices for each product type?", "sql": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04747", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the product type whose average price is higher than the average price of all products.", "sql": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04748", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the code of the product type with an average price higher than the average price of all products?", "sql": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04749", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the id and name of the staff who has been assigned for the shortest period.", "sql": "SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04750", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the id and name of the staff who has been assigned for the least amount of time?", "sql": "SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04751", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the names and ids of all products whose price is between 600 and 700.", "sql": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04752", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names and ids of products costing between 600 and 700?", "sql": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04753", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the ids of all distinct customers who made order after some orders that were Cancelled.", "sql": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04754", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct ids of customers who made an order after any order that was Cancelled?", "sql": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04755", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?", "sql": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04756", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.", "sql": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04757", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names and ids of customers whose address contains TN?", "sql": "SELECT customer_name, customer_id FROM customers WHERE customer_address ILIKE '%TN%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04758", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the names and ids of customers who have TN in their address.", "sql": "SELECT customer_name, customer_id FROM customers WHERE customer_address ILIKE '%TN%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04761", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "List the name of staff who has been assigned multiple jobs.", "sql": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id, T1.staff_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04762", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names of staff who have been assigned multiple jobs?", "sql": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id, T1.staff_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04763", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "List the name and phone number of all suppliers in the alphabetical order of their addresses.", "sql": "SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04764", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?", "sql": "SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04765", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the phone numbers of all customers and suppliers.", "sql": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04766", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the phone numbers for all customers and suppliers.", "sql": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04767", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the ids of all products that were ordered more than three times or supplied more than 80000.", "sql": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04768", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", "sql": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04769", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are id and name of the products whose price is lower than 600 or higher than 900?", "sql": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04770", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give the ids and names of products with price lower than 600 or higher than 900.", "sql": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04771", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.", "sql": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04772", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?", "sql": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04775", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the largest and smallest customer codes?", "sql": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04776", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Return the maximum and minimum customer codes.", "sql": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04777", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "List the names of all the distinct customers who bought a keyboard.", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04778", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct names of customers who have purchased a keyboard?", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04779", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "List the names and phone numbers of all the distinct suppliers who supply red jeans.", "sql": "SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04780", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct names and phone numbers for suppliers who have red jeans?", "sql": "SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04781", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?", "sql": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04782", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.", "sql": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04783", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.", "sql": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04784", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?", "sql": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04785", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the names of products that were bought by at least two distinct customers.", "sql": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id, T3.product_name HAVING COUNT(DISTINCT T1.customer_id) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04786", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct names of products purchased by at least two different customers?", "sql": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id, T3.product_name HAVING COUNT(DISTINCT T1.customer_id) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04787", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the names of customers who have bought by at least three distinct products.", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(DISTINCT T3.product_id) >= 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04788", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the distinct names of customers who have purchased at least three different products?", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(DISTINCT T3.product_id) >= 3;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04789", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.", "sql": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04790", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?", "sql": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04791", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.", "sql": "SELECT customer_id, customer_name FROM customers WHERE customer_address ILIKE '%WY%' AND payment_method_code <> 'Credit Card';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04792", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?", "sql": "SELECT customer_id, customer_name FROM customers WHERE customer_address ILIKE '%WY%' AND payment_method_code <> 'Credit Card';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04793", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the average price of all product clothes.", "sql": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04794", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the average price of clothes?", "sql": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04795", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "Find the name of the most expensive hardware product.", "sql": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04796", "db_id": "department_store", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status_code VARCHAR /* e.g. 'Pending', 'Cancelled' */, order_date TIMESTAMP);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Credit Card', 'Direct Debit' */, customer_code BIGINT, customer_name VARCHAR /* e.g. 'Abbie', 'Adah' */, customer_address VARCHAR, customer_phone VARCHAR /* e.g. '(443)013-3112x528', '(730)934-8249' */, customer_email VARCHAR /* e.g. 'cconroy@example.net', 'celine.bogan@example.com' */);\nCREATE TABLE Department_Store_Chain (dept_store_chain_id BIGINT, dept_store_chain_name VARCHAR /* e.g. 'East', 'North' */);\nCREATE TABLE Department_Stores (dept_store_id BIGINT, dept_store_chain_id BIGINT, store_name VARCHAR /* e.g. 'store_name' */, store_address VARCHAR, store_phone VARCHAR /* e.g. '(587)993-3604x3077', '(626)763-7031' */, store_email VARCHAR /* e.g. 'alexandro.mcclure@example.net', 'bmaggio@example.com' */);\nCREATE TABLE Departments (department_id BIGINT, dept_store_id BIGINT, department_name VARCHAR /* e.g. 'advertising', 'human resource' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT);\nCREATE TABLE Product_Suppliers (product_id BIGINT, supplier_id BIGINT, date_supplied_from TIMESTAMP, date_supplied_to TIMESTAMP, total_amount_purchased DOUBLE, total_value_purchased DOUBLE);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Clothes', 'Hardware' */, product_name VARCHAR /* e.g. 'red jeans', 'black jeans' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_gender BIGINT, staff_name VARCHAR /* e.g. 'Adrienne', 'Archibald' */);\nCREATE TABLE Staff_Department_Assignments (staff_id BIGINT, department_id BIGINT, date_assigned_from TIMESTAMP, job_title_code VARCHAR /* e.g. 'Clerical Staff', 'Administration' */, date_assigned_to TIMESTAMP);\nCREATE TABLE Supplier_Addresses (supplier_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Suppliers (supplier_id BIGINT, supplier_name VARCHAR /* e.g. 'AB Store', 'Audi' */, supplier_phone VARCHAR /* e.g. '(692)009-5928', '1-432-960-2402x1734' */);", "question": "What is the name of the hardware product with the greatest price?", "sql": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04797", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "How many aircrafts are there?", "sql": "SELECT COUNT(*) FROM aircraft;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04798", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the number of aircraft?", "sql": "SELECT COUNT(*) FROM aircraft;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04799", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List the description of all aircrafts.", "sql": "SELECT Description FROM aircraft;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04800", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the descriptions for the aircrafts?", "sql": "SELECT Description FROM aircraft;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04801", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the average number of international passengers of all airports?", "sql": "SELECT AVG(International_Passengers) FROM airport;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04802", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the average number of international passengers for an airport?", "sql": "SELECT AVG(International_Passengers) FROM airport;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04803", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the number of international and domestic passengers of the airport named London \"Heathrow\"?", "sql": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04804", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "How many international and domestic passengers are there in the airport London Heathrow?", "sql": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04805", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the total number of Domestic Passengers of airports that contain the word \"London\".", "sql": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name ILIKE '%London%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04806", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the total number of domestic passengers at all London airports?", "sql": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name ILIKE '%London%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04807", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the maximum and minimum number of transit passengers of all aiports.", "sql": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04808", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the maximum and mininum number of transit passengers for all airports?", "sql": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04809", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the name of pilots aged 25 or older?", "sql": "SELECT Name FROM pilot WHERE Age >= 25;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04810", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "what is the name of every pilot who is at least 25 years old?", "sql": "SELECT Name FROM pilot WHERE Age >= 25;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04811", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List all pilot names in ascending alphabetical order.", "sql": "SELECT Name FROM pilot ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04812", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of the pilots in alphabetical order?", "sql": "SELECT Name FROM pilot ORDER BY Name ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04813", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List names of all pilot aged 30 or younger in descending alphabetical order.", "sql": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04814", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all pilots 30 years old or young in descending alphabetical order?", "sql": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04815", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "Please show the names of aircrafts associated with airport with name \"London Gatwick\".", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04816", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all the aircrafts associated with London Gatwick airport?", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04817", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.", "sql": "SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04818", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "sql": "SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04819", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", "sql": "SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04820", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?", "sql": "SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04821", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "Please list the location and the winning aircraft name.", "sql": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04822", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the location and name of the winning aircraft?", "sql": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04825", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List the names of aircrafts and the number of times it won matches.", "sql": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft, T1.Aircraft;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04826", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "For each aircraft that has won an award, what is its name and how many time has it won?", "sql": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft, T1.Aircraft;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04827", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List names of all pilot in descending order of age.", "sql": "SELECT Name FROM pilot ORDER BY Age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04828", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all pilots listed by descending age?", "sql": "SELECT Name FROM pilot ORDER BY Age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04829", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List the names of aircrafts and that won matches at least twice.", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft, T1.Aircraft HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04830", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all aircrafts that have won a match at least twice?", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft, T1.Aircraft HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04831", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "List the names of aircrafts and that did not win any match.", "sql": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04832", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all aicrafts that have never won any match?", "sql": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04833", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\"", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04834", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?", "sql": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04835", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "Show all information on the airport that has the largest number of international passengers.", "sql": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04836", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is all the information on the airport with the largest number of international passengers?", "sql": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04837", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.", "sql": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot, t1.name, t1.age ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04838", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "sql": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot, t1.name, t1.age ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04839", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "what is the name and age of the youngest winning pilot?", "sql": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04840", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "How old is the youngest winning pilot and what is their name?", "sql": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04841", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "find the name of pilots who did not win the matches held in the country of Australia.", "sql": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04842", "db_id": "aircraft", "schema_text": "CREATE TABLE aircraft (Aircraft_ID BIGINT, Aircraft VARCHAR /* e.g. 'Bell 206B3 JetRanger', 'CH-47D Chinook' */, Description VARCHAR /* e.g. 'Heavy-lift helicopter', 'Light utility helicopter' */, Max_Gross_Weight VARCHAR /* e.g. '1,370 lb (635 kg)', '123,500 lb (56,000 kg)' */, Total_disk_area VARCHAR /* e.g. '4,900 ft² (460 m²)', '497 ft² (46.2 m²)' */, Max_disk_Loading VARCHAR /* e.g. '14.5 lb/ft² (71 kg/m²)', '15 lb/ft² (72 kg/m²)' */);\nCREATE TABLE airport (Airport_ID BIGINT, Airport_Name VARCHAR /* e.g. 'Birmingham Airport', 'Bristol' */, Total_Passengers DOUBLE, \"%_Change_2007\" VARCHAR /* e.g. '0.5%', '1.5%' */, International_Passengers DOUBLE, Domestic_Passengers DOUBLE, Transit_Passengers DOUBLE, Aircraft_Movements DOUBLE, Freight_Metric_Tonnes DOUBLE);\nCREATE TABLE airport_aircraft (ID BIGINT, Airport_ID BIGINT, Aircraft_ID BIGINT);\nCREATE TABLE match (Round DOUBLE, Location VARCHAR /* e.g. 'EuroSpeedway Lausitz', 'Flamengo Beach , Rio de Janeiro' */, Country VARCHAR /* e.g. 'Australia', 'Brazil' */, Date VARCHAR /* e.g. 'April 17–18', 'August 7–8' */, Fastest_Qualifying VARCHAR /* e.g. 'Hannes Arch', 'Paul Bonhomme' */, Winning_Pilot BIGINT, Winning_Aircraft BIGINT);\nCREATE TABLE pilot (Pilot_Id BIGINT, Name VARCHAR /* e.g. 'Ayana Spencer', 'Baylee Steuber' */, Age BIGINT);", "question": "What are the names of the pilots that have not won any matches in Australia?", "sql": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04843", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "How many residents does each property have? List property id and resident count.", "sql": "SELECT T1.property_id, COUNT(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04844", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?", "sql": "SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04847", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "List the id and type of each thing, and the details of the organization that owns it.", "sql": "SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04848", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What are the id and details of the customers who have at least 3 events?", "sql": "SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T1.customer_details HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04849", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What is each customer's move in date, and the corresponding customer id and details?", "sql": "SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04850", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "Which events have the number of notes between one and three? List the event id and the property id.", "sql": "SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id, T1.property_id HAVING COUNT(*) BETWEEN 1 AND 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04851", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'", "sql": "SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04852", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?", "sql": "SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04853", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "How many different status codes of things are there?", "sql": "SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04854", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "Which organizations are not a parent organization of others? List the organization id.", "sql": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04855", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "When is the last day any resident moved in?", "sql": "SELECT MAX(date_moved_in) FROM Residents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04856", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What are the resident details containing the substring 'Miss'?", "sql": "SELECT other_details FROM Residents WHERE other_details ILIKE '%Miss%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04857", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "List the customer event id and the corresponding move in date and property id.", "sql": "SELECT customer_event_id, date_moved_in, property_id FROM customer_events;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04858", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "How many customers did not have any event?", "sql": "SELECT COUNT(*) FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_events);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04859", "db_id": "local_govt_and_lot", "schema_text": "CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID BIGINT, Customer_Event_ID BIGINT, service_type_code VARCHAR /* e.g. 'Cleanning', 'Check' */, resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP);\nCREATE TABLE Customer_Events (Customer_Event_ID BIGINT, customer_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, resident_id BIGINT, thing_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_details VARCHAR /* e.g. 'Bridgette Nitzsche PhD', 'Dr. Haylie Hilll III' */);\nCREATE TABLE Organizations (organization_id BIGINT, parent_organization_id BIGINT, organization_details VARCHAR /* e.g. 'Denesik and Sons Party', 'Reinger, Hudson and Nolan Group' */);\nCREATE TABLE Properties (property_id BIGINT, property_type_code VARCHAR /* e.g. 'house', 'apartment' */, property_address VARCHAR /* e.g. '04164 Raul Stream', '129 Chasity Brook' */, other_details VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Residents (resident_id BIGINT, property_id BIGINT, date_moved_in TIMESTAMP, date_moved_out TIMESTAMP, other_details VARCHAR /* e.g. 'Anderson Batz', 'Cassie Johnson' */);\nCREATE TABLE Residents_Services (resident_id BIGINT, service_id BIGINT, date_moved_in TIMESTAMP, property_id BIGINT, date_requested TIMESTAMP, date_provided TIMESTAMP, other_details VARCHAR /* e.g. 'Unsatisfied', 'Satisfied' */);\nCREATE TABLE Services (service_id BIGINT, organization_id BIGINT, service_type_code VARCHAR /* e.g. 'Pay bills', 'Check' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Things (thing_id BIGINT, organization_id BIGINT, Type_of_Thing_Code VARCHAR /* e.g. 'Commen', 'Electronics' */, service_type_code VARCHAR /* e.g. 'Check', 'Cleanning' */, service_details VARCHAR /* e.g. 'Satisfied', 'Unsatisfied' */);\nCREATE TABLE Timed_Locations_of_Things (thing_id BIGINT, Date_and_Time TIMESTAMP, Location_Code VARCHAR /* e.g. '064 Charles Mou', '113 Geo Glens A' */);\nCREATE TABLE Timed_Status_of_Things (thing_id BIGINT, Date_and_Date TIMESTAMP, Status_of_Thing_Code VARCHAR /* e.g. 'Close', 'In Progress' */);", "question": "What are the distinct move in dates of the residents?", "sql": "SELECT DISTINCT date_moved_in FROM residents;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04860", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "How many schools are there?", "sql": "SELECT COUNT(*) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04861", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Count the number of schools.", "sql": "SELECT COUNT(*) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04862", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the locations of schools in ascending order of enrollment.", "sql": "SELECT LOCATION FROM school ORDER BY Enrollment ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04863", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What is the list of school locations sorted in ascending order of school enrollment?", "sql": "SELECT LOCATION FROM school ORDER BY Enrollment ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04864", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the locations of schools in descending order of founded year.", "sql": "SELECT LOCATION FROM school ORDER BY Founded DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04865", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What is the list of school locations sorted in descending order of school foundation year?", "sql": "SELECT LOCATION FROM school ORDER BY Founded DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04866", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the enrollments of schools whose denomination is not \"Catholic\"?", "sql": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04867", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the enrollment for each school that does not have \"Catholic\" as denomination.", "sql": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04868", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What is the average enrollment of schools?", "sql": "SELECT AVG(Enrollment) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04869", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Take the average of the school enrollment.", "sql": "SELECT AVG(Enrollment) FROM school;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04870", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the teams of the players, sorted in ascending alphabetical order?", "sql": "SELECT Team FROM player ORDER BY Team ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04871", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Find the team of each player and sort them in ascending alphabetical order.", "sql": "SELECT Team FROM player ORDER BY Team ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04872", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "How many different positions of players are there?", "sql": "SELECT COUNT(DISTINCT POSITION) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04873", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Count the number of distinct player positions.", "sql": "SELECT COUNT(DISTINCT POSITION) FROM player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04874", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Find the team of the player of the highest age.", "sql": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04875", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Which team has the oldest player?", "sql": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04876", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the teams of the players with the top 5 largest ages.", "sql": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04877", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the teams that have the 5 oldest players?", "sql": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04878", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "For each player, show the team and the location of school they belong to.", "sql": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04879", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the team and the location of school each player belongs to?", "sql": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04880", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show the locations of schools that have more than 1 player.", "sql": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID, T2.Location HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04881", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Which schools have more than 1 player? Give me the school locations.", "sql": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID, T2.Location HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04882", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show the denomination of the school that has the most players.", "sql": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID, T2.Denomination ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04883", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What is the denomination of the school the most players belong to?", "sql": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID, T2.Denomination ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04884", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show locations and nicknames of schools.", "sql": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04885", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the location and nickname of each school?", "sql": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04886", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Please show different denominations and the corresponding number of schools.", "sql": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04887", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "For each denomination, return the denomination and the count of schools with that denomination.", "sql": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04888", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Please show different denominations and the corresponding number of schools in descending order.", "sql": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04889", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.", "sql": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_04890", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the school color of the school that has the largest enrollment.", "sql": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04891", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What is the school color of the school with the largest enrollment?", "sql": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04892", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "List the locations of schools that do not have any player.", "sql": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04893", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Which schools do not have any player? Give me the school locations.", "sql": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04894", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show the denomination shared by schools founded before 1890 and schools founded after 1900", "sql": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04895", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?", "sql": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04896", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show the nicknames of schools that are not in division 1.", "sql": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04897", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the nicknames of schools whose division is not 1?", "sql": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04898", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "Show the denomination shared by more than one school.", "sql": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04899", "db_id": "school_player", "schema_text": "CREATE TABLE player (Player_ID BIGINT, Player VARCHAR, Team VARCHAR, Age BIGINT, Position VARCHAR /* e.g. 'First baseman', 'Right-handed pitcher' */, School_ID BIGINT);\nCREATE TABLE school (School_ID BIGINT, School VARCHAR /* e.g. 'Barker College', 'Cranbrook School' */, Location VARCHAR /* e.g. 'Bellevue Hill', 'Hornsby' */, Enrollment DOUBLE, Founded DOUBLE, Denomination VARCHAR /* e.g. 'Anglican', 'Catholic' */, Boys_or_Girls VARCHAR /* e.g. 'Boys', 'Boys only to Yr 9 Co-ed Year 10 to 12' */, Day_or_Boarding VARCHAR /* e.g. 'Day & Boarding', 'Day' */, Year_Entered_Competition DOUBLE, School_Colors VARCHAR /* e.g. 'Royal Blue and Gold', 'Black & Blue' */);\nCREATE TABLE school_details (School_ID BIGINT, Nickname VARCHAR /* e.g. 'Auks', 'Buccaneers' */, Colors VARCHAR /* e.g. 'Blue and Gold', 'Blue and Yellow' */, League VARCHAR /* e.g. 'DSHA' */, Class VARCHAR /* e.g. 'Flight B', 'Fight A' */, Division VARCHAR /* e.g. 'Division 3', 'Division 1' */);\nCREATE TABLE school_performance (School_Id BIGINT, School_Year VARCHAR, Class_A VARCHAR /* e.g. 'Martin''s Mill', 'Anton' */, Class_AA VARCHAR /* e.g. 'Weimar', 'Blanco' */);", "question": "What are the denomination more than one school have?", "sql": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04944", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the total enrollment number of all colleges?", "sql": "SELECT SUM(enr) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04945", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students are enrolled in college?", "sql": "SELECT SUM(enr) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04946", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the average enrollment number?", "sql": "SELECT AVG(enr) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04947", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students, on average, does each college have enrolled?", "sql": "SELECT AVG(enr) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04948", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many colleges in total?", "sql": "SELECT COUNT(*) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04949", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many different colleges are there?", "sql": "SELECT COUNT(*) FROM College;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04950", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many players have more than 1000 hours of training?", "sql": "SELECT COUNT(*) FROM Player WHERE HS > 1000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04951", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many different players trained for more than 1000 hours?", "sql": "SELECT COUNT(*) FROM Player WHERE HS > 1000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04952", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many colleges has more than 15000 students?", "sql": "SELECT COUNT(*) FROM College WHERE enr > 15000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04953", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the number of colleges with a student population greater than 15000?", "sql": "SELECT COUNT(*) FROM College WHERE enr > 15000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04954", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the average training hours of all players?", "sql": "SELECT AVG(HS) FROM Player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04955", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many hours do the players train on average?", "sql": "SELECT AVG(HS) FROM Player;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04956", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name and training hours of players whose hours are below 1500.", "sql": "SELECT pName, HS FROM Player WHERE HS < 1500;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04957", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?", "sql": "SELECT pName, HS FROM Player WHERE HS < 1500;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04958", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many different colleges do attend the tryout test?", "sql": "SELECT COUNT(DISTINCT cName) FROM tryout;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04959", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many different colleges were represented at tryouts?", "sql": "SELECT COUNT(DISTINCT cName) FROM tryout;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04960", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the unique types of player positions in the tryout?", "sql": "SELECT COUNT(DISTINCT pPos) FROM tryout;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04961", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the different types of player positions?", "sql": "SELECT COUNT(DISTINCT pPos) FROM tryout;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04962", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students got accepted after the tryout?", "sql": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04963", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students received a yes from tryouts?", "sql": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04964", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students whose are playing the role of goalie?", "sql": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04965", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the number of students playing as a goalie?", "sql": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04966", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the max, average and min training hours of all players.", "sql": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04967", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the average, maximum, and minimum for the number of hours spent training?", "sql": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04968", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is average enrollment of colleges in the state FL?", "sql": "SELECT AVG(enr) FROM College WHERE state = 'FL';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04969", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is average number of students enrolled in Florida colleges?", "sql": "SELECT AVG(enr) FROM College WHERE state = 'FL';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04970", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of players whose training hours is between 500 and 1500?", "sql": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04971", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of players who train between 500 and 1500 hours?", "sql": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04972", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the players whose names contain letter 'a'.", "sql": "SELECT DISTINCT pName FROM Player WHERE pName ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04973", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Who are the players that have names containing the letter a?", "sql": "SELECT DISTINCT pName FROM Player WHERE pName ILIKE '%a%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04974", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.", "sql": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04975", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?", "sql": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04976", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "List all information about college sorted by enrollment number in the ascending order.", "sql": "SELECT * FROM College ORDER BY enr;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04977", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What information do you have on colleges sorted by increasing enrollment numbers?", "sql": "SELECT * FROM College ORDER BY enr;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04978", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.", "sql": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04979", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?", "sql": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04980", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name of players whose card is yes in the descending order of training hours.", "sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04981", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the name of the players who received a card in descending order of the hours of training?", "sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04982", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name of different colleges involved in the tryout in alphabetical order.", "sql": "SELECT DISTINCT cName FROM tryout ORDER BY cName;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04983", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the different names of the colleges involved in the tryout in alphabetical order?", "sql": "SELECT DISTINCT cName FROM tryout ORDER BY cName;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04984", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Which position is most popular among players in the tryout?", "sql": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04985", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What was the most popular position at tryouts?", "sql": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_04988", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is minimum hours of the students playing in different position?", "sql": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04989", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "For each position, what is the minimum time students spent practicing?", "sql": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04990", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of schools with the top 3 largest size?", "sql": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04991", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of the schools with the top 3 largest class sizes?", "sql": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04992", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the name of school that has the smallest enrollment in each state?", "sql": "SELECT cName, state, MIN(enr) FROM college GROUP BY state, cName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04993", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the name of the school with smallest enrollment size per state?", "sql": "SELECT cName, state, MIN(enr) FROM college GROUP BY state, cName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04994", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the states where have some college students in tryout.", "sql": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04995", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the different states that have students trying out?", "sql": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_04996", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the states where have some college students in tryout and their decisions are yes.", "sql": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04997", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the different states that had students successfully try out?", "sql": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04998", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name and college of students whose decisions are yes in the tryout.", "sql": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_04999", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?", "sql": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05000", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name of all students who were in the tryout sorted in alphabetic order.", "sql": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05001", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all students who tried out in alphabetical order?", "sql": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05002", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name and hours of the students whose tryout decision is yes.", "sql": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05003", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names and hours spent practicing of every student who received a yes at tryouts?", "sql": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05004", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the states of the colleges that have students in the tryout who played in striker position.", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05005", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the states of the colleges where students who tried out for the striker position attend?", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05006", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of the students who are in the position of striker and got a yes tryout decision.", "sql": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05007", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all students who successfully tried out for the position of striker?", "sql": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05008", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the state of the college which player Charles is attending.", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05009", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "In which state is the college that Charles attends?", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05010", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the average and maximum hours for the students whose tryout decision is yes.", "sql": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05011", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the average and maximum number of hours students who made the team practiced?", "sql": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05012", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the average hours for the students whose tryout decision is no.", "sql": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05013", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the average number of hours spent practicing for students who got rejected?", "sql": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05014", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", "sql": "SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos, pPos;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05015", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?", "sql": "SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos, pPos;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05016", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Which colleges do the tryout players whose name starts with letter D go to?", "sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName ILIKE 'D%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05017", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName ILIKE 'D%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05018", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Which college has any student who is a goalie and succeeded in the tryout.", "sql": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05019", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What college has a student who successfully made the team in the role of a goalie?", "sql": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05020", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the name of the tryout players who are from the college with largest size.", "sql": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05021", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all tryout participants who are from the largest college?", "sql": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05022", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.", "sql": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05023", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?", "sql": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05024", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.", "sql": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05025", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?", "sql": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05026", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of schools that have some students playing in goalie and mid positions.", "sql": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05027", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.", "sql": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05028", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of states that have some college students playing in goalie and mid positions.", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05029", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05030", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many schools have some students playing in goalie and mid positions.", "sql": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05031", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many schools have students playing in goalie and mid-field positions?", "sql": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05032", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of schools that have some players in the mid position but not in the goalie position.", "sql": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05033", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of the schools with some players in the mid position but no goalies?", "sql": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05034", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the names of states that have some college students playing in the mid position but not in the goalie position.", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05035", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all the states with college students playing in the mid position but no goalies?", "sql": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05036", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many states that have some college students playing in the mid position but not in the goalie position.", "sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05037", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie');", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05038", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find the states where have the colleges whose enrollments are less than the largest size.", "sql": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05039", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the states with colleges that have enrollments less than the some other college?", "sql": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05040", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.", "sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05041", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05042", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.", "sql": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05043", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What are the names of all colleges with a larger enrollment than the largest college in Florida?", "sql": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05044", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the total number of enrollment of schools that do not have any goalie player?", "sql": "SELECT SUM(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = 'goalie');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05045", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the total number of students enrolled in schools without any goalies?", "sql": "SELECT SUM(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = 'goalie');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05046", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the number of states that has some college whose enrollment is larger than the average enrollment?", "sql": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05047", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many states have a college with more students than average?", "sql": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05048", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?", "sql": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05049", "db_id": "soccer_2", "schema_text": "CREATE TABLE College (cName VARCHAR /* e.g. 'ASU', 'FSU' */, state VARCHAR /* e.g. 'AZ', 'FL' */, enr DOUBLE);\nCREATE TABLE Player (pID DOUBLE, pName VARCHAR /* e.g. 'Andrew', 'Blake' */, yCard VARCHAR /* e.g. 'no', 'yes' */, HS DOUBLE);\nCREATE TABLE Tryout (pID DOUBLE, cName VARCHAR /* e.g. 'ASU', 'LSU' */, pPos VARCHAR /* e.g. 'goalie', 'mid' */, decision VARCHAR /* e.g. 'no', 'yes' */);", "question": "How many states have smaller colleges than average?", "sql": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05050", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "How many devices are there?", "sql": "SELECT COUNT(*) FROM device;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05051", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Count the number of devices.", "sql": "SELECT COUNT(*) FROM device;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05052", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the carriers of devices in ascending alphabetical order.", "sql": "SELECT Carrier FROM device ORDER BY Carrier ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05053", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the different carriers for devices, listed in alphabetical order?", "sql": "SELECT Carrier FROM device ORDER BY Carrier ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05054", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the carriers of devices whose software platforms are not \"Android\"?", "sql": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05055", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Return the device carriers that do not have Android as their software platform.", "sql": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05056", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the names of shops in ascending order of open year?", "sql": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05057", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Return the names of shops, ordered by year of opening ascending.", "sql": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05058", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What is the average quantity of stocks?", "sql": "SELECT AVG(Quantity) FROM stock;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05059", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Give the average quantity of stocks.", "sql": "SELECT AVG(Quantity) FROM stock;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05060", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the names and location of the shops in ascending alphabetical order of name.", "sql": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05061", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Return the names and locations of shops, ordered by name in alphabetical order.", "sql": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05062", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "How many different software platforms are there for devices?", "sql": "SELECT COUNT(DISTINCT Software_Platform) FROM device;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05063", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Count the number of different software platforms.", "sql": "SELECT COUNT(DISTINCT Software_Platform) FROM device;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05064", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the open date of open year of the shop named \"Apple\".", "sql": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05065", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the open dates and years for the shop named Apple?", "sql": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05066", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the name of the shop with the latest open year.", "sql": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05067", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What is the shop name corresponding to the shop that opened in the most recent year?", "sql": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05068", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show names of shops and the carriers of devices they have in stock.", "sql": "SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05069", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the names of device shops, and what are the carriers that they carry devices in stock for?", "sql": "SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05070", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show names of shops that have more than one kind of device in stock.", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05071", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the names of shops that have more than a single kind of device in stock?", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05072", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show the name of the shop that has the most kind of devices in stock.", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05073", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What is the name of the shop that has the most different kinds of devices in stock?", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05074", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show the name of the shop that have the largest quantity of devices in stock.", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name ORDER BY SUM(T1.quantity) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05075", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What is the name of the shop that has the greatest quantity of devices in stock?", "sql": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID, T2.Shop_Name ORDER BY SUM(T1.quantity) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05076", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Please show different software platforms and the corresponding number of devices using each.", "sql": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05077", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the different software platforms for devices, and how many devices have each?", "sql": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05078", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Please show the software platforms of devices in descending order of the count.", "sql": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05079", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the different software platforms for devices, ordered by frequency descending?", "sql": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05080", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the software platform shared by the greatest number of devices.", "sql": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05081", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What is the software platform that is most common amongst all devices?", "sql": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05082", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the names of shops that have no devices in stock.", "sql": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05083", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the names of shops that do not have any devices in stock?", "sql": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05084", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.", "sql": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05085", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?", "sql": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05086", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "List the carriers of devices that have no devices in stock.", "sql": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05087", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the carriers of devices that are not in stock anywhere?", "sql": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05088", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "Show the carriers of devices in stock at more than one shop.", "sql": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID, T2.Carrier HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05089", "db_id": "device", "schema_text": "CREATE TABLE device (Device_ID BIGINT, Device VARCHAR /* e.g. 'Apple', 'BlackBerry Storm 9530' */, Carrier VARCHAR /* e.g. 'Bell Mobility', 'Iusacell' */, Package_Version VARCHAR /* e.g. '5.0.0.419', '4.7.0.208' */, Applications VARCHAR /* e.g. '5.0.0.419', '4.7.0.151' */, Software_Platform VARCHAR /* e.g. 'Android', 'iOS' */);\nCREATE TABLE shop (Shop_ID BIGINT, Shop_Name VARCHAR /* e.g. 'ATnT', 'Apple' */, Location VARCHAR /* e.g. 'Blaenllechau', 'Dinas' */, Open_Date VARCHAR /* e.g. '1 January', '10 December' */, Open_Year BIGINT);\nCREATE TABLE stock (Shop_ID BIGINT, Device_ID BIGINT, Quantity BIGINT);", "question": "What are the carriers of devices that are in stock in more than a single shop?", "sql": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID, T2.Carrier HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05090", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "How many bookings do we have?", "sql": "SELECT COUNT(*) FROM BOOKINGS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05091", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Count the total number of bookings made.", "sql": "SELECT COUNT(*) FROM BOOKINGS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05092", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List the order dates of all the bookings.", "sql": "SELECT Order_Date FROM BOOKINGS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05093", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the order date of each booking?", "sql": "SELECT Order_Date FROM BOOKINGS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05094", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all the planned delivery dates and actual delivery dates of bookings.", "sql": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05095", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the planned delivery date and actual delivery date for each booking?", "sql": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05096", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "How many customers do we have?", "sql": "SELECT COUNT(*) FROM CUSTOMERS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05097", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Count the number of customers recorded.", "sql": "SELECT COUNT(*) FROM CUSTOMERS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05098", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the phone and email for customer Harold?", "sql": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05099", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the phone number and email address of customer \"Harold\".", "sql": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05100", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all the Store_Name of drama workshop groups.", "sql": "SELECT Store_Name FROM Drama_Workshop_Groups;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05101", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the store names of drama workshop groups?", "sql": "SELECT Store_Name FROM Drama_Workshop_Groups;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05102", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show the minimum, average, maximum order quantity of all invoices.", "sql": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05103", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", "sql": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05104", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the distinct payment method codes in all the invoices?", "sql": "SELECT DISTINCT payment_method_code FROM INVOICES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05105", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show me the distinct payment method codes from the invoice record.", "sql": "SELECT DISTINCT payment_method_code FROM INVOICES;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05106", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the description of the marketing region China?", "sql": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05107", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the marketing region description of China?", "sql": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05108", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all the distinct product names with price higher than the average.", "sql": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05109", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the distinct names of the products that cost more than the average?", "sql": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05110", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the name of the most expensive product?", "sql": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05111", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Tell me the name of the most pricy product.", "sql": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05112", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List all product names in ascending order of price.", "sql": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05113", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Sort the names of products in ascending order of their price.", "sql": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05114", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the phone number of the performer Ashley?", "sql": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05115", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the phone number of performer \"Ashley\".", "sql": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05116", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all payment method codes and the number of orders for each code.", "sql": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05117", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List the distinct payment method codes with the number of orders made", "sql": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05118", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the payment method code used by the most orders?", "sql": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05119", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the payment method that is used the most often in all the invoices. Give me its code.", "sql": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05120", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Which city is the address of the store named \"FJA Filming\" located in?", "sql": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05121", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the city the store named \"FJA Filming\" is in.", "sql": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05122", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the states or counties of the address of the stores with marketing region code \"CA\"?", "sql": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05123", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the states or counties where the stores with marketing region code \"CA\" are located.", "sql": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05124", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the name of the marketing region that the store Rob Dinning belongs to?", "sql": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05125", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Return the name of the marketing region the store Rob Dinning is located in.", "sql": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05126", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the descriptions of the service types with product price above 100?", "sql": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05127", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Give me the descriptions of the service types that cost more than 100.", "sql": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05128", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the description, code and the corresponding count of each service type?", "sql": "SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code, T1.Service_Type_Description;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05129", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List the description, code and the number of services for each service type.", "sql": "SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code, T1.Service_Type_Description;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05132", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the phones and emails of workshop groups in which services are performed?", "sql": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05133", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.", "sql": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05134", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the names of workshop groups in which services with product name \"film\" are performed?", "sql": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05135", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the names of the workshop groups where services with product name \"film\" are performed.", "sql": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05136", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the different product names? What is the average product price for each of them?", "sql": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05137", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "For each distinct product name, show its average product price.", "sql": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05138", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the product names with average product price smaller than 1000000?", "sql": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05139", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the product names whose average product price is below 1000000.", "sql": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05140", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the total order quantities of photo products?", "sql": "SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05141", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Compute the total order quantities of the product \"photo\".", "sql": "SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05142", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the order details of the products with price higher than 2000?", "sql": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05143", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the order detail for the products with price above 2000.", "sql": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05144", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the actual delivery dates of orders with quantity 1?", "sql": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05145", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List the actual delivery date for all the orders with quantity 1", "sql": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05146", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the order dates of orders with price higher than 1000?", "sql": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05147", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the order dates of the orders with price above 1000.", "sql": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05148", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "How many distinct currency codes are there for all drama workshop groups?", "sql": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05149", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the number of distinct currency codes used in drama workshop groups.", "sql": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05150", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the names of the drama workshop groups with address in Feliciaberg city?", "sql": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05151", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Return the the names of the drama workshop groups that are located in Feliciaberg city.", "sql": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05152", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the email addresses of the drama workshop groups with address in Alaska state?", "sql": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05153", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "List the email addresses of the drama workshop groups located in Alaska state.", "sql": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05154", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all cities along with the number of drama workshop groups in each city.", "sql": "SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05155", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "How many drama workshop groups are there in each city? Return both the city and the count.", "sql": "SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05156", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the marketing region code that has the most drama workshop groups?", "sql": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05157", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Which marketing region has the most drama workshop groups? Give me the region code.", "sql": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05158", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show all cities where at least one customer lives in but no performer lives in.", "sql": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05159", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Which cities have at least one customer but no performer?", "sql": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05160", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the most frequent status of bookings?", "sql": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05161", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Which status code is the most common of all the bookings?", "sql": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05162", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the names of the workshop groups that have bookings with status code \"stop\"?", "sql": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05163", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Which workshop groups have bookings with status code \"stop\"? Give me the names.", "sql": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05164", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Show the names of all the clients with no booking.", "sql": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05165", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What are the names of the clients who do not have any booking?", "sql": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05166", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the average quantities ordered with payment method code \"MasterCard\" on invoices?", "sql": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05167", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", "sql": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05168", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the product ID of the most frequently ordered item on invoices?", "sql": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05169", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Find the id of the product ordered the most often on invoices.", "sql": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05170", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "What is the description of the service type which offers both the photo product and the film product?", "sql": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05171", "db_id": "cre_Drama_Workshop_Groups", "schema_text": "CREATE TABLE Addresses (Address_ID BIGINT, Line_1 VARCHAR /* e.g. '0855 Ziemann Island', '2082 Runolfsson Cliffs' */, Line_2 VARCHAR /* e.g. 'Apt. 012', 'Apt. 107' */, City_Town VARCHAR /* e.g. 'Chrisside', 'Cronaborough' */, State_County VARCHAR /* e.g. 'Ohio', 'Maryland' */, Other_Details VARCHAR);\nCREATE TABLE Bookings (Booking_ID BIGINT, Customer_ID BIGINT, Workshop_Group_ID BIGINT, Status_Code VARCHAR /* e.g. 'good', 'stop' */, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Bookings_Services (Order_ID BIGINT, Product_ID BIGINT);\nCREATE TABLE Clients (Client_ID BIGINT, Address_ID BIGINT, Customer_Email_Address VARCHAR /* e.g. 'alba04@example.com', 'boyer.carleton@example.com' */, Customer_Name VARCHAR /* e.g. 'Alvis', 'Arvid' */, Customer_Phone VARCHAR /* e.g. '(042)912-3404x5135', '(066)903-6363' */, Other_Details VARCHAR /* e.g. 'VIP', 'Super VIP' */);\nCREATE TABLE Customer_Orders (Order_ID BIGINT, Customer_ID BIGINT, Store_ID BIGINT, Order_Date TIMESTAMP, Planned_Delivery_Date TIMESTAMP, Actual_Delivery_Date TIMESTAMP, Other_Order_Details VARCHAR);\nCREATE TABLE Customers (Customer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Adelbert', 'Alek' */, Customer_Phone VARCHAR /* e.g. '(191)727-6065x6351', '(514)659-1318x46123' */, Customer_Email_Address VARCHAR /* e.g. 'cassin.cielo@example.org', 'clemens43@example.org' */, Other_Details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID BIGINT, Address_ID BIGINT, Currency_Code VARCHAR /* e.g. 'EU', 'USD' */, Marketing_Region_Code VARCHAR /* e.g. 'RU', 'DE' */, Store_Name VARCHAR /* e.g. 'Amely Cafe', 'Bednar Film' */, Store_Phone VARCHAR /* e.g. '(020)161-0983x567', '(256)743-0310' */, Store_Email_Address VARCHAR /* e.g. 'amely.ruecker@example.com', 'arturo.orn@example.org' */, Other_Details VARCHAR /* e.g. 'Good', 'Bad' */);\nCREATE TABLE Invoice_Items (Invoice_Item_ID BIGINT, Invoice_ID BIGINT, Order_ID BIGINT, Order_Item_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR /* e.g. 'Good quality' */);\nCREATE TABLE Invoices (Invoice_ID BIGINT, Order_ID BIGINT, payment_method_code VARCHAR /* e.g. 'MasterCard', 'Visa' */, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR, Order_Item_ID BIGINT);\nCREATE TABLE Marketing_Regions (Marketing_Region_Code VARCHAR /* e.g. 'CA', 'CN' */, Marketing_Region_Name VARCHAR /* e.g. 'Canada', 'China' */, Marketing_Region_Descriptrion VARCHAR /* e.g. 'Our largest market', 'Our main market' */, Other_Details VARCHAR);\nCREATE TABLE Order_Items (Order_Item_ID BIGINT, Order_ID BIGINT, Product_ID BIGINT, Order_Quantity BIGINT, Other_Item_Details VARCHAR);\nCREATE TABLE Performers (Performer_ID BIGINT, Address_ID BIGINT, Customer_Name VARCHAR /* e.g. 'Ashley', 'Dariana' */, Customer_Phone VARCHAR /* e.g. '(054)005-5168', '(654)496-1642x31167' */, Customer_Email_Address VARCHAR /* e.g. 'anderson34@example.net', 'chaim10@example.com' */, Other_Details VARCHAR /* e.g. 'Did not pay', 'Pay good tips' */);\nCREATE TABLE Performers_in_Bookings (Order_ID BIGINT, Performer_ID BIGINT);\nCREATE TABLE Products (Product_ID BIGINT, Product_Name VARCHAR /* e.g. 'film', 'photo' */, Product_Price DOUBLE, Product_Description VARCHAR, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Ref_Payment_Methods (payment_method_code VARCHAR /* e.g. 'American E', 'MasterCard' */, payment_method_description VARCHAR /* e.g. 'Visa', 'credit' */);\nCREATE TABLE Ref_Service_Types (Service_Type_Code BIGINT, Parent_Service_Type_Code BIGINT, Service_Type_Description VARCHAR /* e.g. 'provide adv promoting service', 'provide dinning service' */);\nCREATE TABLE Services (Service_ID BIGINT, Service_Type_Code BIGINT, Workshop_Group_ID BIGINT, Product_Description VARCHAR, Product_Name VARCHAR /* e.g. 'photo', 'film' */, Product_Price DOUBLE, Other_Product_Service_Details VARCHAR);\nCREATE TABLE Stores (Store_ID BIGINT, Address_ID BIGINT, Marketing_Region_Code VARCHAR /* e.g. 'CA', 'ES' */, Store_Name VARCHAR /* e.g. 'Adam Photo', 'Adan Dinning' */, Store_Phone VARCHAR /* e.g. '(941)444-7666x7089', '+46(1)1411714927' */, Store_Email_Address VARCHAR /* e.g. 'adams.miles@example.net', 'adan93@example.com' */, Other_Details VARCHAR /* e.g. '5 stars', '3 stars' */);", "question": "Give me the description of the service type that offers not only the photo product but also the film product.", "sql": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05172", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many bands are there?", "sql": "SELECT COUNT(*) FROM Band;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05173", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the number of bands.", "sql": "SELECT COUNT(*) FROM Band;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05174", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are all the labels?", "sql": "SELECT DISTINCT label FROM Albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05175", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the different album labels listed?", "sql": "SELECT DISTINCT label FROM Albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05176", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the albums in 2012.", "sql": "SELECT * FROM Albums WHERE YEAR = 2012;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05177", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "return all columns of the albums created in the year of 2012.", "sql": "SELECT * FROM Albums WHERE YEAR = 2012;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05178", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the stage positions of the musicians with first name \"Solveig\"", "sql": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05179", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the different stage positions for all musicians whose first name is \"Solveig\"?", "sql": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05180", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs are there?", "sql": "SELECT COUNT(*) FROM Songs;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05181", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Count the number of songs.", "sql": "SELECT COUNT(*) FROM Songs;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05182", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the songs performed by artist with last name \"Heilo\"", "sql": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05183", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of the songs by the artist whose last name is \"Heilo\"?", "sql": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05184", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Hom many musicians performed in the song \"Flash\"?", "sql": "SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05185", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many musicians play in the song \"Flash\"?", "sql": "SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05186", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the songs produced by artists with first name \"Marianne\".", "sql": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05187", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of all songs produced by the artist with the first name \"Marianne\"?", "sql": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05188", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Who performed the song named \"Badlands\"? Show the first name and the last name.", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05189", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the first and last names of the artist who perfomed the song \"Badlands\"?", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05190", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name.", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05191", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"?", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05192", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many unique labels are there for albums?", "sql": "SELECT COUNT(DISTINCT label) FROM albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05193", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the unique labels for the albums?", "sql": "SELECT COUNT(DISTINCT label) FROM albums;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05194", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the label that has the most albums?", "sql": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05195", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the label with the most albums?", "sql": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05196", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the musician that have produced the most number of songs?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05197", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the musician who was in the most songs?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05198", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the musician that has been at the back position the most?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05199", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the musicians who has played back position the most?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05200", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the songs whose name contains the word \"the\".", "sql": "SELECT title FROM songs WHERE title ILIKE '% the %';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05201", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of the songs whose title has the word \"the\"?", "sql": "SELECT title FROM songs WHERE title ILIKE '% the %';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05202", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are all the instruments used?", "sql": "SELECT DISTINCT instrument FROM Instruments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05203", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the different instruments listed in the database?", "sql": "SELECT DISTINCT instrument FROM Instruments;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05204", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"?", "sql": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05205", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"?", "sql": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05206", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the most used instrument?", "sql": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05207", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instrument is used the most?", "sql": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05208", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs have used the instrument \"drums\"?", "sql": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05209", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs use drums as an instrument?", "sql": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05210", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instruments does the the song \"Le Pop\" use?", "sql": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05211", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the instruments are used in the song \"Le Pop\"?", "sql": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05212", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many instruments does the song \"Le Pop\" use?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05213", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many different instruments are used in the song \"Le Pop\"?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05214", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many instrument does the musician with last name \"Heilo\" use?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05215", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many different instruments does the musician with the last name \"Heilo\" use?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05216", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the instruments ever used by the musician with last name \"Heilo\"?", "sql": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05217", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are all the instruments used by the musician with the last name \"Heilo\"?", "sql": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05218", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which song has the most vocals?", "sql": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid, title ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05219", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the song with the most vocals?", "sql": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid, title ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05220", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type is the most frequently appearring type?", "sql": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05221", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the type of vocables that appears most frequently?", "sql": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05222", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type has the band mate with last name \"Heilo\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05223", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the type of vocals that the band member with the last name \"Heilo\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05224", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the vocal types used in song \"Le Pop\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05225", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the types of vocals used in the song \"Le Pop\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05226", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the number of vocal types used in song \"Demon Kitty Rag\"?", "sql": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05227", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the types of vocals used in the song \"Demon Kitty Rag\"?", "sql": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05228", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs have a lead vocal?", "sql": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05229", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs have vocals of type lead?", "sql": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05230", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05231", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05232", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the songs that do not have a lead vocal.", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05233", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of the songs without a lead vocal?", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05234", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the vocal types.", "sql": "SELECT DISTINCT TYPE FROM vocals;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05235", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the different types of vocals?", "sql": "SELECT DISTINCT TYPE FROM vocals;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05236", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the albums produced in year 2010?", "sql": "SELECT * FROM Albums WHERE YEAR = 2010;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05237", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What information is there on albums from 2010?", "sql": "SELECT * FROM Albums WHERE YEAR = 2010;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05238", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Who performed the song named \"Le Pop\"?", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05239", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the first and last name of artist who performed \"Le Pop\"?", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05240", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the musician that have produced the most songs?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05241", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the last name of the artist who sang the most songs?", "sql": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05242", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"?", "sql": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05243", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"?", "sql": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05244", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many instruments does the song \"Badlands\" use?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05245", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many different instruments are used in the song \"Badlands\"?", "sql": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05246", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the vocal types used in song \"Badlands\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05247", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What types of vocals are used in the song \"Badlands\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05248", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the number of vocal types used in song \"Le Pop\"", "sql": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05249", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many vocal types are used in the song \"Le Pop\"?", "sql": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05250", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs have a shared vocal?", "sql": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05251", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many different songs have shared vocals?", "sql": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05252", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find all the songs that do not have a back vocal.", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05253", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the different names of all songs without back vocals?", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05254", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type has the band mate with first name \"Solveig\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05255", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the types of vocals that the band member with the first name \"Solveig\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05256", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05257", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05258", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the first name of the band mate that has performed in most songs.", "sql": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname, t2.firstname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05259", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the first name of the band mate who perfomed in the most songs?", "sql": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname, t2.firstname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05260", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Which vocal type has the band mate with first name \"Marianne\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05261", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the vocal type of the band mate whose first name is \"Marianne\" played the most?", "sql": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05262", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05263", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"?", "sql": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05264", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the name of songs that does not have a back vocal.", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05265", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of the songs that do not have back vocals?", "sql": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05266", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?", "sql": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05267", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"?", "sql": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05268", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are all the songs in albums under label \"Universal Music Group\"?", "sql": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05269", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "What are the names of all the songs whose album is under the label of \"Universal Music Group\"?", "sql": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05270", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "Find the number of songs in all the studio albums.", "sql": "SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05271", "db_id": "music_2", "schema_text": "CREATE TABLE Albums (AId BIGINT, Title VARCHAR, Year BIGINT, Label VARCHAR, Type VARCHAR);\nCREATE TABLE Band (Id BIGINT, Firstname VARCHAR, Lastname VARCHAR);\nCREATE TABLE Instruments (SongId BIGINT, BandmateId BIGINT, Instrument VARCHAR);\nCREATE TABLE Performance (SongId BIGINT, Bandmate BIGINT, StagePosition VARCHAR);\nCREATE TABLE Songs (SongId BIGINT, Title VARCHAR);\nCREATE TABLE Tracklists (AlbumId BIGINT, Position BIGINT, SongId BIGINT);\nCREATE TABLE Vocals (SongId BIGINT, Bandmate BIGINT, Type VARCHAR);", "question": "How many songs appear in studio albums?", "sql": "SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05272", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Who is the founder of Sony?", "sql": "SELECT founder FROM manufacturers WHERE name = 'Sony';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05273", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Return the founder of Sony.", "sql": "SELECT founder FROM manufacturers WHERE name = 'Sony';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05274", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Where is the headquarter of the company founded by James?", "sql": "SELECT headquarter FROM manufacturers WHERE founder = 'James';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05275", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the headquarter of the company whose founder is James?", "sql": "SELECT headquarter FROM manufacturers WHERE founder = 'James';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05276", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "sql": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05277", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names and headquarters of all manufacturers, ordered by revenue descending?", "sql": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05278", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the average, maximum and total revenues of all companies?", "sql": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05279", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Return the average, maximum, and total revenues across all manufacturers.", "sql": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05280", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many companies were created by Andy?", "sql": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05281", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Return the number of companies created by Andy.", "sql": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05282", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the total revenue created by the companies whose headquarter is located at Austin.", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05283", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the sum of revenue from companies with headquarters in Austin?", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05284", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the different cities listed?", "sql": "SELECT DISTINCT headquarter FROM manufacturers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05285", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Give the distinct headquarters of manufacturers.", "sql": "SELECT DISTINCT headquarter FROM manufacturers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05286", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the number of manufactures that are based in Tokyo or Beijing.", "sql": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05287", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many manufacturers have headquarters in either Tokyo or Beijing?", "sql": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05288", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the founder of the company whose name begins with the letter 'S'.", "sql": "SELECT founder FROM manufacturers WHERE name ILIKE 'S%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05289", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Who is the founders of companies whose first letter is S?", "sql": "SELECT founder FROM manufacturers WHERE name ILIKE 'S%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05290", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name of companies whose revenue is between 100 and 150.", "sql": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05291", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of companies with revenue between 100 and 150?", "sql": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05292", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05293", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05294", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name of product that is produced by both companies Creative Labs and Sony.", "sql": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05295", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of products produced by both Creative Labs and Sony?", "sql": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05296", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.", "sql": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05297", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names, headquarters and founders of the company with the highest revenue?", "sql": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05298", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.", "sql": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05299", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?", "sql": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05300", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name of companies whose revenue is greater than the average revenue of all companies.", "sql": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05301", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of manufacturers with revenue greater than the average of all revenues?", "sql": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05302", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.", "sql": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05303", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?", "sql": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05304", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05305", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?", "sql": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05306", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the total revenue of companies of each founder.", "sql": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05307", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the total revenue of companies started by founder?", "sql": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05308", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name and revenue of the company that earns the highest revenue in each city.", "sql": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter, name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05309", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names and revenues of the companies with the highest revenues in each headquarter city?", "sql": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter, name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05310", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the total revenue for each manufacturer.", "sql": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05311", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the total revenue of each manufacturer?", "sql": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05312", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the average prices of all products from each manufacture, and list each company's name.", "sql": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05313", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the average prices of products for each manufacturer?", "sql": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05314", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the number of different products that are produced by companies at different headquarter cities.", "sql": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05315", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many different products are produced in each headquarter city?", "sql": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05316", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find number of products which Sony does not make.", "sql": "SELECT COUNT(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05317", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many products are not made by Sony?", "sql": "SELECT COUNT(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05318", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the name of companies that do not make DVD drive.", "sql": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05319", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of companies that do not make DVD drives?", "sql": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05320", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find the number of products for each manufacturer, showing the name of each company.", "sql": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05321", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many products are there for each manufacturer?", "sql": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05322", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the names of all the products in the store.", "sql": "SELECT Name FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05323", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of all products?", "sql": "SELECT Name FROM Products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05324", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the names and the prices of all the products in the store.", "sql": "SELECT name, price FROM products;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05325", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names and prices of all products in the store?", "sql": "SELECT name, price FROM products;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05326", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the name of the products with a price less than or equal to $200.", "sql": "SELECT name FROM products WHERE price <= 200;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05327", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names of products with price at most 200?", "sql": "SELECT name FROM products WHERE price <= 200;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05328", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Find all information of all the products with a price between $60 and $120.", "sql": "SELECT * FROM products WHERE price BETWEEN 60 AND 120;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05329", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is all the information of all the products that have a price between 60 and 120?", "sql": "SELECT * FROM products WHERE price BETWEEN 60 AND 120;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05330", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Compute the average price of all the products.", "sql": "SELECT AVG(price) FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05331", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the average price across all products?", "sql": "SELECT AVG(price) FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05332", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Compute the average price of all products with manufacturer code equal to 2.", "sql": "SELECT AVG(price) FROM products WHERE Manufacturer = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05333", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the average price of products with manufacturer codes equal to 2?", "sql": "SELECT AVG(price) FROM products WHERE Manufacturer = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05334", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Compute the number of products with a price larger than or equal to $180.", "sql": "SELECT COUNT(*) FROM products WHERE price >= 180;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05335", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "How many products have prices of at least 180?", "sql": "SELECT COUNT(*) FROM products WHERE price >= 180;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05336", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order).", "sql": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05337", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?", "sql": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05338", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select all the data from the products and each product's manufacturer.", "sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05339", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is all the product data, as well as each product's manufacturer?", "sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05340", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the average price of each manufacturer's products, showing only the manufacturer's code.", "sql": "SELECT AVG(Price), Manufacturer FROM Products GROUP BY Manufacturer;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05341", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the average prices of products, grouped by manufacturer code?", "sql": "SELECT AVG(Price), Manufacturer FROM Products GROUP BY Manufacturer;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05342", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the average price of each manufacturer's products, showing the manufacturer's name.", "sql": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05343", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the average prices of products, grouped by manufacturer name?", "sql": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05344", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the names of manufacturer whose products have an average price higher than or equal to $150.", "sql": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05345", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?", "sql": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05346", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "Select the name and price of the cheapest product.", "sql": "SELECT name, price FROM Products ORDER BY price ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05347", "db_id": "manufactory_1", "schema_text": "CREATE TABLE Manufacturers (Code BIGINT, Name VARCHAR /* e.g. 'Creative Labs', 'Fujitsu' */, Headquarter VARCHAR /* e.g. 'Austin', 'Beijing' */, Founder VARCHAR /* e.g. 'Andy', 'James' */, Revenue DOUBLE);\nCREATE TABLE Products (Code BIGINT, Name VARCHAR /* e.g. 'DVD drive', 'CD drive' */, Price DOUBLE, Manufacturer BIGINT);", "question": "What is the name and price of the cheapest product?", "sql": "SELECT name, price FROM Products ORDER BY price ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05352", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What is the id of the problem log that is created most recently?", "sql": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05353", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problem log was created most recently? Give me the log id.", "sql": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05354", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What is the oldest log id and its corresponding problem id?", "sql": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05355", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the oldest log id and its corresponding problem id.", "sql": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05356", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find all the ids and dates of the logs for the problem whose id is 10.", "sql": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05357", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "For the problem with id 10, return the ids and dates of its problem logs.", "sql": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05358", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "List all the log ids and their descriptions from the problem logs.", "sql": "SELECT problem_log_id, log_entry_description FROM problem_log;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05359", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the log id and entry description of each problem?", "sql": "SELECT problem_log_id, log_entry_description FROM problem_log;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05360", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.", "sql": "SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05361", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which staff members are assigned to the problem with id 1? Give me their first and last names.", "sql": "SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05362", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "List the problem id and log id which are assigned to the staff named Rylan Homenick.", "sql": "SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05363", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problem id and log id are assigned to the staff named Rylan Homenick?", "sql": "SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05364", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "How many problems are there for product voluptatem?", "sql": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05365", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "How many problems did the product called \"voluptatem\" have in record?", "sql": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05366", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "sql": "SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05367", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which product has the most problems? Give me the number of problems and the product name.", "sql": "SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05368", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.", "sql": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05369", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.", "sql": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05370", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the ids of the problems that are reported by the staff whose last name is Bosco.", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05371", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05372", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the ids of the problems which are reported after 1978-06-26?", "sql": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05373", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the ids of the problems reported after 1978-06-26.", "sql": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05374", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the ids of the problems which are reported before 1978-06-26?", "sql": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05375", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problems are reported before 1978-06-26? Give me the ids of the problems.", "sql": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05376", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "For each product which has problems, what are the number of problems and the product id?", "sql": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05377", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "For each product with some problems, list the count of problems and the product id.", "sql": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05378", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "sql": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05379", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.", "sql": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05380", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "List the names of all the distinct product names in alphabetical order?", "sql": "SELECT DISTINCT product_name FROM product ORDER BY product_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05381", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Sort all the distinct product names in alphabetical order.", "sql": "SELECT DISTINCT product_name FROM product ORDER BY product_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05382", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "List all the distinct product names ordered by product id?", "sql": "SELECT DISTINCT product_name FROM product ORDER BY product_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05383", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What is the list of distinct product names sorted by product id?", "sql": "SELECT DISTINCT product_name FROM product ORDER BY product_id;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05384", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?", "sql": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05385", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.", "sql": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05386", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?", "sql": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05387", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.", "sql": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05388", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05389", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05390", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05391", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.", "sql": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05392", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the top 3 products which have the largest number of problems?", "sql": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05393", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "What are the three products that have the most problems?s", "sql": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05396", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"?", "sql": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05397", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names.", "sql": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05398", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?", "sql": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05399", "db_id": "tracking_software_problems", "schema_text": "CREATE TABLE Problem_Category_Codes (problem_category_code VARCHAR /* e.g. 'Datatabase', 'GUI' */, problem_category_description VARCHAR /* e.g. 'Database design or contents.', 'Infrastructrure and Architecture' */);\nCREATE TABLE Problem_Log (problem_log_id BIGINT, assigned_to_staff_id BIGINT, problem_id BIGINT, problem_category_code VARCHAR /* e.g. 'GUI', 'Middleware' */, problem_status_code VARCHAR /* e.g. 'Solved', 'Reported' */, log_entry_date TIMESTAMP, log_entry_description VARCHAR /* e.g. 'a', 'c' */, log_entry_fix VARCHAR /* e.g. 'k', 't' */, other_log_details VARCHAR /* e.g. 'c', 'd' */);\nCREATE TABLE Problem_Status_Codes (problem_status_code VARCHAR /* e.g. 'Reported', 'Solved' */, problem_status_description VARCHAR /* e.g. 'Reported', 'Solved' */);\nCREATE TABLE Problems (problem_id BIGINT, product_id BIGINT, closure_authorised_by_staff_id BIGINT, reported_by_staff_id BIGINT, date_problem_reported TIMESTAMP, date_problem_closed TIMESTAMP, problem_description VARCHAR /* e.g. 'a', 'd' */, other_problem_details VARCHAR /* e.g. 'c', 'f' */);\nCREATE TABLE Product (product_id BIGINT, product_name VARCHAR /* e.g. 'blog', 'chat' */, product_details VARCHAR /* e.g. 'q', 'd' */);\nCREATE TABLE Staff (staff_id BIGINT, staff_first_name VARCHAR /* e.g. 'Ashley', 'Christop' */, staff_last_name VARCHAR /* e.g. 'Berge', 'Bosco' */, other_staff_details VARCHAR /* e.g. 'x', 'j' */);", "question": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?", "sql": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON TRUE JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05402", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show name, address road, and city for all branches sorted by open year.", "sql": "SELECT name, address_road, city FROM branch ORDER BY open_year;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05403", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the names, address roads, and cities of the branches ordered by opening year?", "sql": "SELECT name, address_road, city FROM branch ORDER BY open_year;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05408", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "List all open years when at least two shops are opened.", "sql": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05409", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the opening years in which at least two shops opened?", "sql": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05412", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show the city and the number of branches opened before 2010 for each city.", "sql": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05413", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "For each city, how many branches opened before 2010?", "sql": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05414", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "How many different levels do members have?", "sql": "SELECT COUNT(DISTINCT LEVEL) FROM member;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05415", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the different membership levels?", "sql": "SELECT COUNT(DISTINCT LEVEL) FROM member;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05416", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show card number, name, and hometown for all members in a descending order of level.", "sql": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05417", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the card numbers, names, and hometowns of every member ordered by descending level?", "sql": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05418", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show the membership level with most number of members.", "sql": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05419", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What is the membership level with the most people?", "sql": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05420", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show all member names and registered branch names sorted by register year.", "sql": "SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05421", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the names of the members and branches at which they are registered sorted by year of registration?", "sql": "SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05422", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show all branch names with the number of members in each branch registered after 2015.", "sql": "SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id, T2.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05423", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "For each branch id, what are the names of the branches that were registered after 2015?", "sql": "SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id, T2.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05424", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show member names without any registered branch.", "sql": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05425", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the names of the members that have never registered at any branch?", "sql": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05426", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "List the branch name and city without any registered members.", "sql": "SELECT name, city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05427", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the names and cities of the branches that do not have any registered members?", "sql": "SELECT name, city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05428", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What is the name and open year for the branch with most number of memberships registered in 2016?", "sql": "SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id, T2.name, T2.open_year ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05429", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What is the name and opening year for the branch that registered the most members in 2016?", "sql": "SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id, T2.name, T2.open_year ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05430", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show the member name and hometown who registered a branch in 2016.", "sql": "SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05431", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the member names and hometowns of those who registered at a branch in 2016?", "sql": "SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05432", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", "sql": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05433", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", "sql": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05436", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What is the sum of total pounds of purchase in year 2018 for all branches in London?", "sql": "SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05437", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "How many total pounds were purchased in the year 2018 at all London branches?", "sql": "SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05438", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What is the total number of purchases for members with level 6?", "sql": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05439", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the total purchases for members rated at level 6?", "sql": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05440", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.", "sql": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05441", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?", "sql": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05442", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "list the card number of all members whose hometown address includes word \"Kentucky\".", "sql": "SELECT card_number FROM member WHERE Hometown ILIKE '%Kentucky%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05443", "db_id": "shop_membership", "schema_text": "CREATE TABLE branch (Branch_ID BIGINT, Name VARCHAR /* e.g. 'Alexandre', 'Brooke Greville' */, Open_year BIGINT, Address_road VARCHAR /* e.g. 'Abbey Rise', 'Abbott Street' */, City VARCHAR /* e.g. 'London', 'Oxford' */, membership_amount BIGINT);\nCREATE TABLE member (Member_ID BIGINT, Card_Number VARCHAR /* e.g. 'FS10', 'LCB7' */, Name VARCHAR /* e.g. 'Braxton Kelley', 'Corey Peters' */, Hometown VARCHAR /* e.g. 'Louisville, Kentucky', 'Collierville, Tennessee' */, Level BIGINT);\nCREATE TABLE membership_register_branch (Member_ID BIGINT, Branch_ID BIGINT, Register_Year BIGINT);\nCREATE TABLE purchase (Member_ID BIGINT, Branch_ID BIGINT, Year BIGINT, Total_pounds DOUBLE);", "question": "What are the card numbers of members from Kentucky?", "sql": "SELECT card_number FROM member WHERE Hometown ILIKE '%Kentucky%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05444", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the number of students in total.", "sql": "SELECT COUNT(*) FROM STUDENT;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05445", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "How many students are there in total?", "sql": "SELECT COUNT(*) FROM STUDENT;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05446", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the number of voting records in total.", "sql": "SELECT COUNT(*) FROM VOTING_RECORD;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05447", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "How many voting records do we have?", "sql": "SELECT COUNT(*) FROM VOTING_RECORD;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05448", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct number of president votes.", "sql": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05449", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "How many distinct president votes are recorded?", "sql": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05450", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the maximum age of all the students.", "sql": "SELECT MAX(Age) FROM STUDENT;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05451", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What is the oldest age among the students?", "sql": "SELECT MAX(Age) FROM STUDENT;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05452", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the last names of students with major 50.", "sql": "SELECT LName FROM STUDENT WHERE Major = 50;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05453", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the last names of students studying major 50?", "sql": "SELECT LName FROM STUDENT WHERE Major = 50;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05454", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the first names of students with age above 22.", "sql": "SELECT Fname FROM STUDENT WHERE Age > 22;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05455", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the first names of all the students aged above 22?", "sql": "SELECT Fname FROM STUDENT WHERE Age > 22;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05456", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the majors of male (sex is M) students?", "sql": "SELECT Major FROM STUDENT WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05457", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "List the major of each male student.", "sql": "SELECT Major FROM STUDENT WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05458", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What is the average age of female (sex is F) students?", "sql": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05459", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the average age of female students.", "sql": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05460", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the maximum and minimum age of students with major 600?", "sql": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05461", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Tell me the ages of the oldest and youngest students studying major 600.", "sql": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05462", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Who are the advisors for students that live in a city with city code \"BAL\"?", "sql": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05463", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Show the advisors of the students whose city of residence has city code \"BAL\".", "sql": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05464", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct secretary votes in the fall election cycle?", "sql": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05465", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Return all the distinct secretary votes made in the fall election cycle.", "sql": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05466", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct president votes on 08/30/2015?", "sql": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05467", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Show all the distinct president votes made on 08/30/2015.", "sql": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05468", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Report the distinct registration date and the election cycle.", "sql": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05469", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct registration dates and the election cycles?", "sql": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05470", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Report the distinct president vote and the vice president vote.", "sql": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05471", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "List all the distinct president votes and the vice president votes.", "sql": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05472", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct last names of the students who have class president votes.", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05473", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct last names of the students who have class president votes?", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05474", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct first names of the students who have class senator votes.", "sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05475", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct first names of the students who have class president votes?", "sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05476", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct ages of students who have secretary votes in the fall election cycle.", "sql": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05477", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct ages of students who have secretary votes in the fall election cycle?", "sql": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05478", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.", "sql": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05479", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Who served as an advisor for students who have treasurer votes in the spring election cycle?", "sql": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05480", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct majors of students who have treasurer votes.", "sql": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05481", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct majors that students with treasurer votes are studying?", "sql": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05482", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the first and last names of all the female (sex is F) students who have president votes.", "sql": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05483", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the first and last names of all the female students who have president votes?", "sql": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05484", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the first and last name of all the students of age 18 who have vice president votes.", "sql": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05485", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the first names and last names of the students who are 18 years old and have vice president votes.", "sql": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05486", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "How many male (sex is M) students have class senator votes in the fall election cycle?", "sql": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05487", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Count the number of male students who had class senator votes in the fall election cycle.", "sql": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05488", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.", "sql": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05489", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.", "sql": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05490", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.", "sql": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05491", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", "sql": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05492", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", "sql": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05493", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What is the average age of the female students with secretary votes in the spring election cycle?", "sql": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05494", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05495", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?", "sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05496", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05497", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05498", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05499", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?", "sql": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05500", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "For each advisor, report the total number of students advised by him or her.", "sql": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05501", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "How many students does each advisor have?", "sql": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05502", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Report all advisors that advise more than 2 students.", "sql": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05503", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Which advisors have more than two students?", "sql": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05504", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Report all majors that have less than 3 students.", "sql": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05505", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What are the majors only less than three students are studying?", "sql": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05506", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "For each election cycle, report the number of voting records.", "sql": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05507", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Count the number of voting records for each election cycle.", "sql": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05508", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Which major has the most students?", "sql": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05509", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the major that is studied by the largest number of students.", "sql": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05510", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "What is the most common major among female (sex is F) students?", "sql": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05511", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Find the major that is studied by the most female students.", "sql": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05514", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Report the distinct advisors who have more than 2 students.", "sql": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05515", "db_id": "voter_2", "schema_text": "CREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Voting_record (StuID BIGINT, Registration_Date VARCHAR /* e.g. '08/30/2013', '08/30/2012' */, Election_Cycle VARCHAR /* e.g. 'Fall', 'Spring' */, President_Vote BIGINT, Vice_President_Vote BIGINT, Secretary_Vote BIGINT, Treasurer_Vote BIGINT, Class_President_Vote BIGINT, Class_Senator_Vote BIGINT);", "question": "Which advisors are advising more than 2 students?", "sql": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05602", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many events are there?", "sql": "SELECT COUNT(*) FROM event;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05603", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "List all the event names by year from the most recent to the oldest.", "sql": "SELECT name FROM event ORDER BY YEAR DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05604", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "What is the name of the event that happened in the most recent year?", "sql": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05605", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many stadiums are there?", "sql": "SELECT COUNT(*) FROM stadium;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05606", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the name of the stadium that has the maximum capacity.", "sql": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05607", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of stadiums whose capacity is smaller than the average capacity.", "sql": "SELECT name FROM stadium WHERE capacity < (SELECT AVG(capacity) FROM stadium);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05608", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the country that has the most stadiums.", "sql": "SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05609", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Which country has at most 3 stadiums listed?", "sql": "SELECT country FROM stadium GROUP BY country HAVING COUNT(*) <= 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05610", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?", "sql": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05611", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many cities have a stadium that was opened before the year of 2006?", "sql": "SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05612", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many stadiums does each country have?", "sql": "SELECT country, COUNT(*) FROM stadium GROUP BY country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05613", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Which countries do not have a stadium that was opened after 2006?", "sql": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05614", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many stadiums are not in country \"Russia\"?", "sql": "SELECT COUNT(*) FROM stadium WHERE country <> 'Russia';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05615", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.", "sql": "SELECT name FROM swimmer ORDER BY meter_100;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05616", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "How many different countries are all the swimmers from?", "sql": "SELECT COUNT(DISTINCT nationality) FROM swimmer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05617", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "List countries that have more than one swimmer.", "sql": "SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05618", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".", "sql": "SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05619", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of swimmers who has a result of \"win\".", "sql": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05621", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", "sql": "SELECT t1.name, t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05622", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of stadiums which have never had any event.", "sql": "SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05623", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the name of the swimmer who has the most records.", "sql": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id, t1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05624", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the name of the swimmer who has at least 2 records.", "sql": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id, t1.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05625", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.", "sql": "SELECT t1.name, t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id, t1.name, t1.nationality HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05626", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of the swimmers who have no record.", "sql": "SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05627", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.", "sql": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05628", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of stadiums that some Australian swimmers have been to.", "sql": "SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05629", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find the names of stadiums that the most swimmers have been to.", "sql": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id, t3.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05630", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "Find all details for each swimmer.", "sql": "SELECT * FROM swimmer;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05631", "db_id": "swimming", "schema_text": "CREATE TABLE event (ID BIGINT, Name VARCHAR /* e.g. 'European FINA', 'FINA' */, Stadium_ID BIGINT, Year BIGINT);\nCREATE TABLE record (ID BIGINT, Result VARCHAR /* e.g. 'Win', 'Loss' */, Swimmer_ID BIGINT, Event_ID BIGINT);\nCREATE TABLE stadium (ID BIGINT, name VARCHAR /* e.g. 'Arena Baltika', 'Baku Olympic Stadium' */, Capacity BIGINT, City VARCHAR /* e.g. 'Baku', 'Budapest' */, Country VARCHAR /* e.g. 'Russia', 'Spain' */, Opening_year BIGINT);\nCREATE TABLE swimmer (ID BIGINT, name VARCHAR /* e.g. 'Craig Stevens', 'Federico Colbertaldo' */, Nationality VARCHAR /* e.g. 'Australia', 'Canada' */, meter_100 DOUBLE, meter_200 VARCHAR /* e.g. '1:57.26', '1:54.40' */, meter_300 VARCHAR /* e.g. '2:53.46', '2:55.90' */, meter_400 VARCHAR /* e.g. '3:52.93', '3:55.36' */, meter_500 VARCHAR /* e.g. '4:52.85', '4:54.19' */, meter_600 VARCHAR /* e.g. '5:52.59', '5:52.92' */, meter_700 VARCHAR /* e.g. '6:50.80', '6:50.91' */, Time VARCHAR /* e.g. '7:46.95', '7:47.91' */);", "question": "What is the average capacity of the stadiums that were opened in year 2005?", "sql": "SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05632", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "How many railways are there?", "sql": "SELECT COUNT(*) FROM railway;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05633", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "List the builders of railways in ascending alphabetical order.", "sql": "SELECT Builder FROM railway ORDER BY Builder ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05634", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "List the wheels and locations of the railways.", "sql": "SELECT Wheels, LOCATION FROM railway;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05635", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "What is the maximum level of managers in countries that are not \"Australia\"?", "sql": "SELECT MAX(LEVEL) FROM manager WHERE Country <> 'Australia\t';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05636", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "What is the average age for all managers?", "sql": "SELECT AVG(Age) FROM manager;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05637", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "What are the names of managers in ascending order of level?", "sql": "SELECT Name FROM manager ORDER BY LEVEL ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05638", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "What are the names and arrival times of trains?", "sql": "SELECT Name, Arrival FROM train;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05639", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "What is the name of the oldest manager?", "sql": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05640", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the names of trains and locations of railways they are in.", "sql": "SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05641", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the builder of railways associated with the trains named \"Andaman Exp\".", "sql": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = 'Andaman Exp';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05642", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show id and location of railways that are associated with more than one train.", "sql": "SELECT T2.Railway_ID, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID, T1.Location HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05644", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show different builders of railways, along with the corresponding number of railways using each builder.", "sql": "SELECT Builder, COUNT(*) FROM railway GROUP BY Builder;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05645", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the most common builder of railways.", "sql": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05646", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show different locations of railways along with the corresponding number of railways at each location.", "sql": "SELECT LOCATION, COUNT(*) FROM railway GROUP BY LOCATION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05647", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the locations that have more than one railways.", "sql": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05648", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "List the object number of railways that do not have any trains.", "sql": "SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05649", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the countries that have both managers of age above 50 and managers of age below 46.", "sql": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05650", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the distinct countries of managers.", "sql": "SELECT DISTINCT Country FROM manager;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05651", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the working years of managers in descending order of their level.", "sql": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05652", "db_id": "railway", "schema_text": "CREATE TABLE manager (Manager_ID BIGINT, Name VARCHAR /* e.g. 'Ben Curtis', 'David Duval' */, Country VARCHAR /* e.g. 'United States', 'Australia' */, Working_year_starts BIGINT, Age BIGINT, Level BIGINT);\nCREATE TABLE railway (Railway_ID BIGINT, Railway VARCHAR /* e.g. 'GERHt', 'GERSt' */, Builder VARCHAR /* e.g. 'GWR Swindon', 'Avonside' */, Built VARCHAR /* e.g. '1905', '1901' */, Wheels VARCHAR /* e.g. '4-4-0', '0-6-0' */, Location VARCHAR /* e.g. 'Barrow Hill', 'Bressingham' */, ObjectNumber VARCHAR /* e.g. '1975-7003', '1975-7005' */);\nCREATE TABLE railway_manage (Railway_ID BIGINT, Manager_ID BIGINT, From_Year BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Train_Num BIGINT, Name VARCHAR /* e.g. 'Andaman Exp', 'Ballarshah-Mumbai Pass' */, \"From\" VARCHAR /* e.g. 'Mumbai CST', 'Ballarshah' */, Arrival VARCHAR /* e.g. '13:04', '05:09' */, Railway_ID BIGINT);", "question": "Show the countries that have managers of age above 50 or below 46.", "sql": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05653", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "How many addresses are there in country USA?", "sql": "SELECT COUNT(*) FROM addresses WHERE country = 'USA';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05654", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show all distinct cities in the address record.", "sql": "SELECT DISTINCT city FROM addresses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05655", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show each state and the number of addresses in each state.", "sql": "SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05656", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show names and phones of customers who do not have address information.", "sql": "SELECT customer_name, customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05658", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the product type codes which have at least two products.", "sql": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05659", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the names of customers who have both an order in completed status and an order in part status.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05660", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the name, phone, and payment method code for all customers in descending order of customer number.", "sql": "SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05662", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the minimum, maximum, average price for all products.", "sql": "SELECT MIN(product_price), MAX(product_price), AVG(product_price) FROM products;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05663", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "How many products have a price higher than the average?", "sql": "SELECT COUNT(*) FROM products WHERE product_price > (SELECT AVG(product_price) FROM products);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05664", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the customer name, customer address city, date from, and date to for each customer address history.", "sql": "SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05665", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the names of customers who use Credit Card payment method and have more than 2 orders.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05667", "db_id": "customers_and_products_contacts", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '01868 Laverna Green', '037 Luella Path' */, city VARCHAR /* e.g. 'Agustinstad', 'East Rickey' */, zip_postcode VARCHAR /* e.g. '037', '041' */, state_province_county VARCHAR /* e.g. 'Kentucky', 'Colorado' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Contacts (contact_id BIGINT, customer_id BIGINT, gender VARCHAR /* e.g. 'female', 'male' */, first_name VARCHAR /* e.g. 'Adella', 'Amani' */, last_name VARCHAR /* e.g. 'Bauch', 'Blick' */, contact_phone VARCHAR /* e.g. '(608)868-5069x554', '(842)564-7057x121' */);\nCREATE TABLE Customer_Address_History (customer_id BIGINT, address_id BIGINT, date_from TIMESTAMP, date_to TIMESTAMP);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_date TIMESTAMP, order_status_code VARCHAR /* e.g. 'Completed', 'Part' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, customer_number BIGINT, customer_name VARCHAR /* e.g. 'Brenna', 'Buford' */, customer_address VARCHAR /* e.g. '058 Ben Street Apt. 034', '075 Skiles Expressway' */, customer_phone VARCHAR /* e.g. '(192)144-4687', '+87(9)5279161988' */, customer_email VARCHAR /* e.g. 'antonette73@example.com', 'bergnaum.ashton@example.com' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, order_id BIGINT, product_id BIGINT, order_quantity VARCHAR /* e.g. '7', '8' */);\nCREATE TABLE Products (product_id BIGINT, product_type_code VARCHAR /* e.g. 'Hardware', 'Clothes' */, product_name VARCHAR /* e.g. 'Apple', 'jcrew' */, product_price DOUBLE);", "question": "Show the product type and name for the products with price higher than 1000 or lower than 500.", "sql": "SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05668", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms only for female (F gender).", "sql": "SELECT dorm_name FROM dorm WHERE gender = 'F';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05669", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the all-female dorms?", "sql": "SELECT dorm_name FROM dorm WHERE gender = 'F';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05670", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms that can accommodate more than 300 students.", "sql": "SELECT dorm_name FROM dorm WHERE student_capacity > 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05671", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of all the dorms that can accomdate more than 300 students?", "sql": "SELECT dorm_name FROM dorm WHERE student_capacity > 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05672", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many female students (sex is F) whose age is below 25?", "sql": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05673", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many girl students who are younger than 25?", "sql": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05674", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name of students who is older than 20.", "sql": "SELECT fname FROM student WHERE age > 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05675", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of all students who are older than 20?", "sql": "SELECT fname FROM student WHERE age > 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05676", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name of students living in city PHL whose age is between 20 and 25.", "sql": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05677", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the first name of the students who are in age 20 to 25 and living in PHL city?", "sql": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05678", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many dorms are there?", "sql": "SELECT COUNT(*) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05679", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many dorms are in the database?", "sql": "SELECT COUNT(*) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05680", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of distinct amenities.", "sql": "SELECT COUNT(*) FROM dorm_amenity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05681", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many diffrent dorm amenities are there?", "sql": "SELECT COUNT(*) FROM dorm_amenity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05682", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the total capacity of all dorms.", "sql": "SELECT SUM(student_capacity) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05683", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the total student capacity of all dorms?", "sql": "SELECT SUM(student_capacity) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05684", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are there?", "sql": "SELECT COUNT(*) FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05685", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students exist?", "sql": "SELECT COUNT(*) FROM student;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05686", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of all students living in the each city.", "sql": "SELECT AVG(age), city_code FROM student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05687", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average age for each city and what are those cities?", "sql": "SELECT AVG(age), city_code FROM student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05688", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average and total capacity of dorms for the students with gender X.", "sql": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05689", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average and total capacity for all dorms who are of gender X?", "sql": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05690", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of dorms that have some amenity.", "sql": "SELECT COUNT(DISTINCT dormid) FROM has_amenity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05691", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many dorms have amenities?", "sql": "SELECT COUNT(DISTINCT dormid) FROM has_amenity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05692", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms that do not have any amenity", "sql": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05693", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of all the dorms that don't have any amenities?", "sql": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05694", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of distinct gender for dorms.", "sql": "SELECT COUNT(DISTINCT gender) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05695", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many different genders are there in the dorms?", "sql": "SELECT COUNT(DISTINCT gender) FROM dorm;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05696", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the capacity and gender type of the dorm whose name has substring ‘Donor’.", "sql": "SELECT student_capacity, gender FROM dorm WHERE dorm_name ILIKE '%Donor%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05697", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?", "sql": "SELECT student_capacity, gender FROM dorm WHERE dorm_name ILIKE '%Donor%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05698", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.", "sql": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05699", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?", "sql": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05700", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the numbers of different majors and cities.", "sql": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05701", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many different majors are there and how many different city codes are there for each student?", "sql": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05702", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms which have both TV Lounge and Study Room as amenities.", "sql": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05703", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?", "sql": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05704", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms which have TV Lounge but no Study Room as amenity.", "sql": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05705", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of each dorm that has a TV Lounge but no study rooms?", "sql": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05706", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.", "sql": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05707", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?", "sql": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05708", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of the dorm with the largest capacity.", "sql": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05709", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the dorm with the largest capacity?", "sql": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05710", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List in alphabetic order all different amenities.", "sql": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05711", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the different dorm amenity names in alphabetical order?", "sql": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05714", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first and last name of students whose age is younger than the average age.", "sql": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05715", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the first and last name of all students who are younger than average?", "sql": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05718", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.", "sql": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05719", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", "sql": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05720", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of dorms and total capacity for each gender.", "sql": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05721", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many dorms are there and what is the total capacity for each gender?", "sql": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05722", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average and oldest age for students with different sex.", "sql": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05723", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average and oldest age for each gender of student?", "sql": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05724", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students in each major.", "sql": "SELECT COUNT(*), major FROM student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05725", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are there in each major?", "sql": "SELECT COUNT(*), major FROM student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05726", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number and average age of students living in each city.", "sql": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05727", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students live in each city and what are their average ages?", "sql": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05728", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age and number of male students (with sex M) from each city.", "sql": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05729", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average age and how many male students are there in each city?", "sql": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05730", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students for the cities where have more than one student.", "sql": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05731", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are from each city, and which cities have more than one cities?", "sql": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05732", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first and last name of students who are not in the largest major.", "sql": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05733", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the first and last name of the students who are not in the largest major?", "sql": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05734", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students whose age is older than the average age for each gender.", "sql": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05735", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are older than average for each gender?", "sql": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05736", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of students living in each dorm and the name of dorm.", "sql": "SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05737", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average age for each dorm and what are the names of each dorm?", "sql": "SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05738", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.", "sql": "SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05739", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "For each dorm, how many amenities does it have?", "sql": "SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05740", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of students who is older than 20 in each dorm.", "sql": "SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05741", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are older than 20 in each dorm?", "sql": "SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05742", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name of students who are living in the Smith Hall.", "sql": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05743", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of all students in Smith Hall?", "sql": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05744", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the average age of students who are living in the dorm with the largest capacity.", "sql": "SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05745", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the average age of students who are living in the dorm with the largest capacity?", "sql": "SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05746", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the total number of students living in the male dorm (with gender M).", "sql": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05747", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the total number of students who are living in a male dorm?", "sql": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05748", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of female students (with F sex) living in Smith Hall", "sql": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05749", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many female students live in Smith Hall?", "sql": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05750", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of amenities Smith Hall dorm have.", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05751", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the amenities that Smith Hall has?", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05752", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05753", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What amenities does Smith Hall have in alphabetical order?", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05754", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of amenity that is most common in all dorms.", "sql": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid, T1.amenity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05755", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the most common amenity in the dorms?", "sql": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid, T1.amenity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05756", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name of students who are living in the dorm that has most number of amenities.", "sql": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid, T2.dormid ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05757", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of all students who live in the dorm with the most amenities?", "sql": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid, T2.dormid ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05758", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name and capacity of the dorm with least number of amenities.", "sql": "SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid, T1.dorm_name, T1.student_capacity ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05759", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name and capacity of the dorm with the fewest amount of amenities?", "sql": "SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid, T1.dorm_name, T1.student_capacity ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05760", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of dorms that do not have amenity TV Lounge.", "sql": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05761", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the dorm that does not have a TV Lounge?", "sql": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05762", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.", "sql": "SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05763", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first and last names of all students who are living in a dorm with a TV Lounge?", "sql": "SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05764", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.", "sql": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05765", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the first name and age of every student who lives in a dorm with a TV Lounge?", "sql": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05766", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of amenities of the dorm where the student with last name Smith is living in.", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05767", "db_id": "dorm_1", "schema_text": "CREATE TABLE Dorm (dormid BIGINT, dorm_name VARCHAR /* e.g. 'Anonymous Donor Hall', 'Bud Jones Hall' */, student_capacity BIGINT, gender VARCHAR /* e.g. 'X', 'F' */);\nCREATE TABLE Dorm_amenity (amenid BIGINT, amenity_name VARCHAR /* e.g. '4 Walls', 'Air Conditioning' */);\nCREATE TABLE Has_amenity (dormid BIGINT, amenid BIGINT);\nCREATE TABLE Lives_in (stuid BIGINT, dormid BIGINT, room_number BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the amenities in the dorm that a student who has the last name of Smith lives in?", "sql": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05768", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "How many customers are there?", "sql": "SELECT COUNT(*) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05769", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Count the number of customers.", "sql": "SELECT COUNT(*) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05770", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.", "sql": "SELECT email_address, phone_number FROM customers ORDER BY email_address, phone_number;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05771", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the emails and phone numbers of all customers, sorted by email address and phone number?", "sql": "SELECT email_address, phone_number FROM customers ORDER BY email_address, phone_number;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05774", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "List the name of all products along with the number of complaints that they have received.", "sql": "SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05775", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are all the different product names, and how many complains has each received?", "sql": "SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05776", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id, t1.email_address ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05777", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?", "sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id, t1.email_address ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05780", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the phone number of the customer who has filed the most recent complaint?", "sql": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05781", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Return the phone number of the customer who filed the complaint that was raised most recently.", "sql": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05782", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the email and phone number of the customers who have never filed a complaint before.", "sql": "SELECT email_address, phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05783", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the emails and phone numbers of custoemrs who have never filed a complaint?", "sql": "SELECT email_address, phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05784", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the phone number of all the customers and staff.", "sql": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05785", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the phone numbers of all customers and all staff members?", "sql": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05786", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the description of the product named \"Chocolate\"?", "sql": "SELECT product_description FROM products WHERE product_name = 'Chocolate';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05787", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Return the description of the product called \"Chocolate\".", "sql": "SELECT product_description FROM products WHERE product_name = 'Chocolate';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05788", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the name and category of the most expensive product.", "sql": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05789", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the name and category code of the product with the highest price?", "sql": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05790", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the prices of products which has never received a single complaint.", "sql": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05791", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the prices of products that have never gotten a complaint?", "sql": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05792", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the average price of the products for each category?", "sql": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05793", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Return the average price of products that have each category code.", "sql": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05794", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the last name of the staff member who processed the complaint of the cheapest product.", "sql": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05795", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?", "sql": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05796", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Which complaint status has more than 3 records on file?", "sql": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05797", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Return complaint status codes have more than 3 corresponding complaints?", "sql": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05798", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the last name of the staff whose email address contains \"wrau\".", "sql": "SELECT last_name FROM staff WHERE email_address ILIKE '%wrau%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05799", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are the last names of staff with email addressed containing the substring \"wrau\"?", "sql": "SELECT last_name FROM staff WHERE email_address ILIKE '%wrau%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05800", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "How many customers are there in the customer type with the most customers?", "sql": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05801", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Count the number of customers that have the customer type that is most common.", "sql": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05802", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What is the last name of the staff who has handled the first ever complaint?", "sql": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05803", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Return the last name of the staff member who handled the complaint with the earliest date raised.", "sql": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05804", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "How many distinct complaint type codes are there in the database?", "sql": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05805", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Count the number of different complaint type codes.", "sql": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05806", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\".", "sql": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05807", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", "sql": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05808", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Find the number of complaints with Product Failure type for each complaint status.", "sql": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05809", "db_id": "customer_complaints", "schema_text": "CREATE TABLE Complaints (complaint_id BIGINT, product_id BIGINT, customer_id BIGINT, complaint_outcome_code VARCHAR /* e.g. 'OK' */, complaint_status_code VARCHAR /* e.g. 'New', 'Open' */, complaint_type_code VARCHAR /* e.g. 'Product Unusable', 'Product Failure' */, date_complaint_raised TIMESTAMP, date_complaint_closed TIMESTAMP, staff_id BIGINT);\nCREATE TABLE Customers (customer_id BIGINT, customer_type_code VARCHAR /* e.g. 'Good Credit Rating', 'Defaults on payments' */, address_line_1 VARCHAR /* e.g. '039 Jedidiah Estate Suite 537', '05355 Marcelle Radial' */, address_line_2 VARCHAR /* e.g. 'Apt. 245', 'Apt. 495' */, town_city VARCHAR /* e.g. 'Funkstad', 'Hansenbury' */, state VARCHAR /* e.g. 'Tennessee', 'Colorado' */, email_address VARCHAR /* e.g. 'cayla.satterfield@example.net', 'hsteuber@example.org' */, phone_number VARCHAR /* e.g. '+38(3)9011433816', '044-468-4549' */);\nCREATE TABLE Products (product_id BIGINT, parent_product_id BIGINT, product_category_code VARCHAR /* e.g. 'Hardware', 'Book' */, date_product_first_available TIMESTAMP, date_product_discontinued TIMESTAMP, product_name VARCHAR /* e.g. 'Chocolate', 'Keyboard' */, product_description VARCHAR /* e.g. 'American novel', 'Blue tooth mouse' */, product_price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, gender BIGINT, first_name VARCHAR /* e.g. 'Austin', 'Bradly' */, last_name VARCHAR /* e.g. 'Boehm', 'Erdman' */, email_address VARCHAR /* e.g. 'brett99@example.net', 'glen.borer@example.com' */, phone_number VARCHAR /* e.g. '(379)551-0838x146', '(383)553-1035x20399' */);", "question": "Of complaints with the type code \"Product Failure\", how many had each different status code?", "sql": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05814", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "How many submissions are there?", "sql": "SELECT COUNT(*) FROM submission;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05815", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Count the number of submissions.", "sql": "SELECT COUNT(*) FROM submission;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05816", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "List the authors of submissions in ascending order of scores.", "sql": "SELECT Author FROM submission ORDER BY Scores ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05817", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Find the author for each submission and list them in ascending order of submission score.", "sql": "SELECT Author FROM submission ORDER BY Scores ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05818", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "What are the authors of submissions and their colleges?", "sql": "SELECT Author, College FROM submission;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05819", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "For each submission, show the author and their affiliated college.", "sql": "SELECT Author, College FROM submission;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05820", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the names of authors from college \"Florida\" or \"Temple\"", "sql": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05821", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Which authors with submissions are from college \"Florida\" or \"Temple\"?", "sql": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05822", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "What is the average score of submissions?", "sql": "SELECT AVG(Scores) FROM submission;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05823", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Compute the average score of submissions.", "sql": "SELECT AVG(Scores) FROM submission;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05824", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "What is the author of the submission with the highest score?", "sql": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05825", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Find the author who achieved the highest score in a submission.", "sql": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05826", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show different colleges along with the number of authors of submission from each college.", "sql": "SELECT College, COUNT(*) FROM submission GROUP BY College;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05827", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "For each college, return the college name and the count of authors with submissions from that college.", "sql": "SELECT College, COUNT(*) FROM submission GROUP BY College;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05830", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.", "sql": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05831", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?", "sql": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05832", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the authors of submissions and the acceptance results of their submissions.", "sql": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05833", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "For each submission, find its author and acceptance result.", "sql": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05834", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the result of the submission with the highest score.", "sql": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05835", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Which submission received the highest score in acceptance result. Show me the result.", "sql": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05836", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show each author and the number of workshops they submitted to.", "sql": "SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05837", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "How many workshops did each author submit to? Return the author name and the number of workshops.", "sql": "SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05838", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the authors who have submissions to more than one workshop.", "sql": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05839", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Which authors have submitted to more than one workshop?", "sql": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05840", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Show the date and venue of each workshop in ascending alphabetical order of the venue.", "sql": "SELECT Date, Venue FROM workshop ORDER BY Venue;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05841", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.", "sql": "SELECT Date, Venue FROM workshop ORDER BY Venue;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05842", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "List the authors who do not have submission to any workshop.", "sql": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05843", "db_id": "workshop_paper", "schema_text": "CREATE TABLE Acceptance (Submission_ID BIGINT, Workshop_ID BIGINT, Result VARCHAR /* e.g. 'Rejected', 'Accepted' */);\nCREATE TABLE submission (Submission_ID BIGINT, Scores DOUBLE, Author VARCHAR /* e.g. 'Andy Bolton', 'Don Bitterlich' */, College VARCHAR /* e.g. 'Fisk', 'Florida' */);\nCREATE TABLE workshop (Workshop_ID BIGINT, Date VARCHAR /* e.g. 'August 18, 2007', 'August 21, 2007' */, Venue VARCHAR /* e.g. 'London UK', 'New York USA' */, Name VARCHAR /* e.g. '2007 qualification', '2008 qualification' */);", "question": "Which authors did not submit to any workshop?", "sql": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05844", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Find the number of investors in total.", "sql": "SELECT COUNT(*) FROM INVESTORS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05845", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show all investor details.", "sql": "SELECT Investor_details FROM INVESTORS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05846", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show all distinct lot details.", "sql": "SELECT DISTINCT lot_details FROM LOTS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05847", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the maximum amount of transaction.", "sql": "SELECT MAX(amount_of_transaction) FROM TRANSACTIONS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05848", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show all date and share count of transactions.", "sql": "SELECT date_of_transaction, share_count FROM TRANSACTIONS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05850", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show all transaction ids with transaction code 'PUR'.", "sql": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05851", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show all dates of transactions whose type code is \"SALE\".", "sql": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05852", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the average amount of transactions with type code \"SALE\".", "sql": "SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05853", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the description of transaction type with code \"PUR\".", "sql": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05855", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the maximum share count of transactions where the amount is smaller than 10000", "sql": "SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05859", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "How many distinct transaction types are used in the transactions?", "sql": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05860", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Return the lot details and investor ids.", "sql": "SELECT lot_details, investor_id FROM LOTS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05861", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Return the lot details of lots that belong to investors with details \"l\"?", "sql": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = 'l';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05862", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "What are the purchase details of transactions with amount bigger than 10000?", "sql": "SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05863", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "What are the sale details and dates of transactions with amount smaller than 3000?", "sql": "SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05866", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the average transaction amount for different transaction types.", "sql": "SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05867", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the maximum and minimum share count of different transaction types.", "sql": "SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05870", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the average amount of transactions for different investors.", "sql": "SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05871", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the average amount of transactions for different lots.", "sql": "SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05872", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", "sql": "SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05873", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.", "sql": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05874", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the number of transactions for different investors.", "sql": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05875", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the transaction type code that occurs the fewest times.", "sql": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05876", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the transaction type code that occurs the most frequently.", "sql": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05877", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the description of the transaction type that occurs most frequently.", "sql": "SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code, T1.transaction_type_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05878", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the id and details of the investor that has the largest number of transactions.", "sql": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id, T1.Investor_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05880", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the ids of the investors who have at least two transactions.", "sql": "SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05881", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "Show the ids and details of the investors who have at least two transactions with type code \"SALE\".", "sql": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = 'SALE' GROUP BY T2.investor_id, T1.Investor_details HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05883", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "What are the details of all sales and purchases?", "sql": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05884", "db_id": "tracking_share_transactions", "schema_text": "CREATE TABLE Investors (investor_id BIGINT, Investor_details VARCHAR /* e.g. 'd', 'k' */);\nCREATE TABLE Lots (lot_id BIGINT, investor_id BIGINT, lot_details VARCHAR /* e.g. 'd', 'z' */);\nCREATE TABLE Purchases (purchase_transaction_id BIGINT, purchase_details VARCHAR /* e.g. 'a', 'r' */);\nCREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, transaction_type_description VARCHAR /* e.g. 'Purchase', 'Sale' */);\nCREATE TABLE Sales (sales_transaction_id BIGINT, sales_details VARCHAR /* e.g. 'p', 'e' */);\nCREATE TABLE Transactions (transaction_id BIGINT, investor_id BIGINT, transaction_type_code VARCHAR /* e.g. 'PUR', 'SALE' */, date_of_transaction TIMESTAMP, amount_of_transaction DOUBLE, share_count VARCHAR /* e.g. '1522', '1654756' */, other_details VARCHAR);\nCREATE TABLE Transactions_Lots (transaction_id BIGINT, lot_id BIGINT);", "question": "What are the details of the lots which are not used in any transactions?", "sql": "SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05885", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "How many available hotels are there in total?", "sql": "SELECT COUNT(*) FROM HOTELS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05886", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the total number of available hotels.", "sql": "SELECT COUNT(*) FROM HOTELS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05889", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show all distinct location names.", "sql": "SELECT DISTINCT Location_Name FROM LOCATIONS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05890", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the distinct location names?", "sql": "SELECT DISTINCT Location_Name FROM LOCATIONS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05891", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the names and details of all the staff members.", "sql": "SELECT Name, Other_Details FROM Staff;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05892", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the name and detail of each staff member?", "sql": "SELECT Name, Other_Details FROM Staff;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05893", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show details of all visitors.", "sql": "SELECT Tourist_Details FROM VISITORS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05894", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the detail of each visitor?", "sql": "SELECT Tourist_Details FROM VISITORS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05899", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the address of the location \"UK Gallery\"?", "sql": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05900", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the address of the location named \"UK Gallery\".", "sql": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05901", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the detail of the location UK Gallery?", "sql": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05902", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Return the detail of the location named \"UK Gallery\".", "sql": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05903", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which location names contain the word \"film\"?", "sql": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name ILIKE '%film%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05904", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find all the locations whose names contain the word \"film\".", "sql": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name ILIKE '%film%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05905", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "How many distinct names are associated with all the photos?", "sql": "SELECT COUNT(DISTINCT Name) FROM PHOTOS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05906", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Count the number of distinct names associated with the photos.", "sql": "SELECT COUNT(DISTINCT Name) FROM PHOTOS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05907", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the distinct visit dates?", "sql": "SELECT DISTINCT Visit_Date FROM VISITS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05908", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find all the distinct visit dates.", "sql": "SELECT DISTINCT Visit_Date FROM VISITS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05909", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of the tourist attractions that can be accessed by bus?", "sql": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05910", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.", "sql": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05911", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?", "sql": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05912", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.", "sql": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05915", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details and opening hours of the museums?", "sql": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05916", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Give me the detail and opening hour for each museum.", "sql": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05917", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the name of the tourist attraction that is associated with the photo \"game1\"?", "sql": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05918", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attraction is associated with the photo \"game1\"? Return its name.", "sql": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05919", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?", "sql": "SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05920", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\".", "sql": "SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05921", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details and ways to get to tourist attractions related to royal family?", "sql": "SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05922", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.", "sql": "SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05923", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details of the shops that can be accessed by walk?", "sql": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05924", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the details of the shops that can be reached by walk.", "sql": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05925", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What is the name of the staff that is in charge of the attraction named \"US museum\"?", "sql": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05926", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Tell me the name of the staff in charge of the attraction called \"US museum\".", "sql": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05927", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details of the markets that can be accessed by walk or bus?", "sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05928", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the details of all the markets that are accessible by walk or bus.", "sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05929", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the visit date and details of the visitor whose detail is 'Vincent'?", "sql": "SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05930", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the visit date and details of the tourist whose detail is 'Vincent'", "sql": "SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05931", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attractions does the visitor with detail 'Vincent' visit?", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05932", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05933", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?", "sql": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05934", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.", "sql": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05939", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the id and star rating of each hotel, ordered by its price from low to high.", "sql": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05940", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the id and star rating of each hotel and sort them in increasing order of price.", "sql": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05941", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the details of the top 3 most expensive hotels.", "sql": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05942", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details of the three most expensive hotels?", "sql": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05943", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the details and star ratings of the 3 least expensive hotels.", "sql": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05944", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the details and star ratings of the three hotels with the lowest price ranges?", "sql": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05945", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the transportation method most people choose to get to tourist attractions.", "sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05946", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which transportation method is used the most often to get to tourist attractions?", "sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05947", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the description and code of the attraction type most tourist attractions belong to.", "sql": "SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code, T1.Attraction_Type_Description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05948", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.", "sql": "SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code, T1.Attraction_Type_Description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05949", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.", "sql": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05950", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.", "sql": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05951", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show different tourist attractions' names, ids, and the corresponding number of visits.", "sql": "SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05952", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the name, id and the corresponding number of visits for each tourist attraction?", "sql": "SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05953", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the names and ids of tourist attractions that are visited at least two times.", "sql": "SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05954", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attractions are visited at least twice? Give me their names and ids.", "sql": "SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05955", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Show the names and ids of tourist attractions that are visited at most once.", "sql": "SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name, T1.Tourist_Attraction_ID HAVING COUNT(*) <= 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05956", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names and ids of the tourist attractions that are visited at most once?", "sql": "SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID, T1.Name, T1.Tourist_Attraction_ID HAVING COUNT(*) <= 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05957", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?", "sql": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05958", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.", "sql": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05959", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of the tourist attractions that have parking or shopping as their feature details?", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05960", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05961", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?", "sql": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05962", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.", "sql": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05963", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of the tourist attractions Vincent and Marcelle visit?", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05964", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05965", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05966", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.", "sql": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 ON TRUE JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05967", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "How many tourists did not make any visit?", "sql": "SELECT COUNT(*) FROM Visitors WHERE Tourist_ID NOT IN (SELECT Tourist_ID FROM Visits);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05968", "db_id": "cre_Theme_park", "schema_text": "CREATE TABLE Features (Feature_ID BIGINT, Feature_Details VARCHAR /* e.g. 'cafe', 'garden' */);\nCREATE TABLE Hotels (hotel_id BIGINT, star_rating_code BIGINT, pets_allowed_yn VARCHAR /* e.g. '1' */, price_range DOUBLE, other_hotel_details VARCHAR);\nCREATE TABLE Locations (Location_ID BIGINT, Location_Name VARCHAR /* e.g. 'African Adventure', 'African Animals' */, Address VARCHAR /* e.g. '0692 Georgiana Pass', '101 Paucek Crescent' */, Other_Details VARCHAR);\nCREATE TABLE Museums (Museum_ID BIGINT, Museum_Details VARCHAR /* e.g. 'MoMA', 'The Metropolitan Museum of Art' */);\nCREATE TABLE Photos (Photo_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'din1', 'din2' */, Description VARCHAR, Filename VARCHAR /* e.g. '060', '128' */, Other_Details VARCHAR);\nCREATE TABLE Ref_Attraction_Types (Attraction_Type_Code BIGINT, Attraction_Type_Description VARCHAR /* e.g. 'adventure', 'gallery' */);\nCREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code BIGINT, star_rating_description VARCHAR /* e.g. 'star' */);\nCREATE TABLE Royal_Family (Royal_Family_ID BIGINT, Royal_Family_Details VARCHAR);\nCREATE TABLE Shops (Shop_ID BIGINT, Shop_Details VARCHAR /* e.g. 'Flower', 'coffee' */);\nCREATE TABLE Staff (Staff_ID BIGINT, Tourist_Attraction_ID BIGINT, Name VARCHAR /* e.g. 'Asia', 'Astrid' */, Other_Details VARCHAR);\nCREATE TABLE Street_Markets (Market_ID BIGINT, Market_Details VARCHAR /* e.g. 'Broadway', 'Fish Farm Market' */);\nCREATE TABLE Theme_Parks (Theme_Park_ID BIGINT, Theme_Park_Details VARCHAR /* e.g. 'Disney', 'Sea World' */);\nCREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID BIGINT, Feature_ID BIGINT);\nCREATE TABLE Tourist_Attractions (Tourist_Attraction_ID BIGINT, Attraction_Type_Code BIGINT, Location_ID BIGINT, How_to_Get_There VARCHAR /* e.g. 'bus', 'walk' */, Name VARCHAR /* e.g. 'UK gallery', 'US museum' */, Description VARCHAR, Opening_Hours VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Visitors (Tourist_ID BIGINT, Tourist_Details VARCHAR /* e.g. 'Aleen', 'Alison' */);\nCREATE TABLE Visits (Visit_ID BIGINT, Tourist_Attraction_ID BIGINT, Tourist_ID BIGINT, Visit_Date TIMESTAMP, Visit_Details VARCHAR);", "question": "Count the number of tourists who did not visit any place.", "sql": "SELECT COUNT(*) FROM Visitors WHERE Tourist_ID NOT IN (SELECT Tourist_ID FROM Visits);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_05969", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many video games exist?", "sql": "SELECT COUNT(*) FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05970", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many video games do you have?", "sql": "SELECT COUNT(*) FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05971", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many video game types exist?", "sql": "SELECT COUNT(DISTINCT gtype) FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05972", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the count of different game types?", "sql": "SELECT COUNT(DISTINCT gtype) FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05973", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all video game types.", "sql": "SELECT DISTINCT gtype FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05974", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the different types of video games?", "sql": "SELECT DISTINCT gtype FROM Video_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05975", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all video games and their types in the order of their names.", "sql": "SELECT gname, gtype FROM Video_games ORDER BY gname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05976", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the names of all the video games and their types in alphabetical order?", "sql": "SELECT gname, gtype FROM Video_games ORDER BY gname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05977", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all video games with type Collectible card game.", "sql": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05978", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the names of all video games that are collectible cards?", "sql": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05979", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the type of video game Call of Destiny.", "sql": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05980", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What type of game is Call of Destiny?", "sql": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05981", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many video games have type Massively multiplayer online game?", "sql": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05982", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Count the number of video games with Massively multiplayer online game type .", "sql": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05983", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all video game types and the number of video games in each type.", "sql": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05984", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the types of video games and how many are in each type?", "sql": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05987", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Which game type has least number of games?", "sql": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05988", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the type with the fewest games?", "sql": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_05989", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show ids for all students who live in CHI.", "sql": "SELECT StuID FROM Student WHERE city_code = 'CHI';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05990", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students who live in CHI?", "sql": "SELECT StuID FROM Student WHERE city_code = 'CHI';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05991", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show ids for all students who have advisor 1121.", "sql": "SELECT StuID FROM Student WHERE Advisor = 1121;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05992", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students who have advisor number 1121?", "sql": "SELECT StuID FROM Student WHERE Advisor = 1121;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05993", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show first name for all students with major 600.", "sql": "SELECT Fname FROM Student WHERE Major = 600;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05994", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the first names for all students who are from the major numbered 600?", "sql": "SELECT Fname FROM Student WHERE Major = 600;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05995", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show the average, minimum, and maximum age for different majors.", "sql": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05996", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the average, minimum, and max ages for each of the different majors?", "sql": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_05997", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all advisors who have at least two students.", "sql": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05998", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the advisors", "sql": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_05999", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many sports do we have?", "sql": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06000", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many different types of sports do we offer?", "sql": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06001", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many students play sports?", "sql": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06002", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many different students are involved in sports?", "sql": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06003", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "List ids for all student who are on scholarship.", "sql": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06004", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids for all sporty students who are on scholarship?", "sql": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06005", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show last names for all student who are on scholarship.", "sql": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06006", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the last names for all scholarship students?", "sql": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06007", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many games are played for all students?", "sql": "SELECT SUM(gamesplayed) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06008", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the total number of games played?", "sql": "SELECT SUM(gamesplayed) FROM Sportsinfo;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06009", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many games are played for all football games by students on scholarship?", "sql": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06010", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the total number of all football games played by scholarship students?", "sql": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06011", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all sport name and the number of students.", "sql": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06012", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many students play each sport?", "sql": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06013", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all student IDs with the number of sports and total number of games played", "sql": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06014", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students along with how many sports and games did they play?", "sql": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06015", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all student IDs with more than total 10 hours per week on all sports played.", "sql": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06016", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", "sql": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06019", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Which sport has most number of students on scholarship?", "sql": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06020", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the sport with the most scholarship students?", "sql": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06021", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show student ids who don't have any sports.", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06022", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students who don't play sports?", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06023", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show student ids who are on scholarship and have major 600.", "sql": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06024", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the student ids for those on scholarship in major number 600?", "sql": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06025", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show student ids who are female and play football.", "sql": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06026", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all female students who play football?", "sql": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06027", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all male student ids who don't play football.", "sql": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06028", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all male students who do not play football?", "sql": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06029", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show total hours per week and number of games played for student David Shieber.", "sql": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06030", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the total number of hours per work and number of games played by David Shieber?", "sql": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06031", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show total hours per week and number of games played for students under 20.", "sql": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06032", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the total number of hours per week and number of games played by students under 20?", "sql": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06033", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many students play video games?", "sql": "SELECT COUNT(DISTINCT StuID) FROM Plays_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06034", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "How many different students play games?", "sql": "SELECT COUNT(DISTINCT StuID) FROM Plays_games;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06035", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show ids of students who don't play video game.", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06036", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students who are not video game players?", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06037", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show ids of students who play video game and play sports.", "sql": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06038", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students who played video games and sports?", "sql": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06039", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all game ids and the number of hours played.", "sql": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06040", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are ids and total number of hours played for each game?", "sql": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06041", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all student ids and the number of hours played.", "sql": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06042", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the ids of all students and number of hours played?", "sql": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06043", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show the game name that has most number of hours played.", "sql": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid, gname ORDER BY SUM(hours_played) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06044", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the name of the game that has been played the most?", "sql": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid, gname ORDER BY SUM(hours_played) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06045", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all game names played by at least 1000 hours.", "sql": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid, gname HAVING SUM(hours_played) >= 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06046", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the names of all the games that have been played for at least 1000 hours?", "sql": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid, gname HAVING SUM(hours_played) >= 1000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06047", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Show all game names played by Linda Smith", "sql": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06048", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the names of all games played by Linda Smith?", "sql": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06049", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Find the last and first name of students who are playing Football or Lacrosse.", "sql": "SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06050", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What is the first and last name of all students who play Football or Lacrosse?", "sql": "SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06051", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Find the first name and age of the students who are playing both Football and Lacrosse.", "sql": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06052", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "What are the first names and ages of all students who are playing both Football and Lacrosse?", "sql": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06053", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.", "sql": "SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06054", "db_id": "game_1", "schema_text": "CREATE TABLE Plays_Games (StuID BIGINT, GameID BIGINT, Hours_Played BIGINT);\nCREATE TABLE SportsInfo (StuID BIGINT, SportName VARCHAR /* e.g. 'Lacrosse', 'Football' */, HoursPerWeek BIGINT, GamesPlayed BIGINT, OnScholarship VARCHAR /* e.g. 'Y', 'N' */);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);\nCREATE TABLE Video_Games (GameID BIGINT, GName VARCHAR /* e.g. 'Call of Destiny', 'Europe is the Universe' */, GType VARCHAR /* e.g. 'Collectible card game', 'Frist-person shooter' */);", "question": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?", "sql": "SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06055", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of all customers.", "sql": "SELECT customer_name FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06056", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of all the customers?", "sql": "SELECT customer_name FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06057", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "How many customers are there?", "sql": "SELECT COUNT(*) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06058", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return the total number of distinct customers.", "sql": "SELECT COUNT(*) FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06059", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the average amount of items ordered in each order?", "sql": "SELECT AVG(order_quantity) FROM order_items;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06060", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the average order quantity per order.", "sql": "SELECT AVG(order_quantity) FROM order_items;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06061", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of customers who use payment method \"Cash\"?", "sql": "SELECT customer_name FROM customers WHERE payment_method = 'Cash';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06062", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which customers use \"Cash\" for payment method? Return the customer names.", "sql": "SELECT customer_name FROM customers WHERE payment_method = 'Cash';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06063", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the \"date became customers\" of the customers whose ID is between 10 and 20.", "sql": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06064", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the dates when customers with ids between 10 and 20 became customers?", "sql": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06065", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which payment method is used by most customers?", "sql": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06066", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the payment method that is used most frequently.", "sql": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06067", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of customers using the most popular payment method?", "sql": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06068", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of the customers who use the most frequently used payment method.", "sql": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06069", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are all the payment methods?", "sql": "SELECT DISTINCT payment_method FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06070", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return all the distinct payment methods used by customers.", "sql": "SELECT DISTINCT payment_method FROM customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06071", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the details of all products?", "sql": "SELECT DISTINCT product_details FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06072", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return the the details of all products.", "sql": "SELECT DISTINCT product_details FROM products;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06073", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of all customers whose name contains \"Alex\".", "sql": "SELECT customer_name FROM customers WHERE customer_name ILIKE '%Alex%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06074", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which customer's name contains \"Alex\"? Find the full name.", "sql": "SELECT customer_name FROM customers WHERE customer_name ILIKE '%Alex%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06075", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\"", "sql": "SELECT product_details FROM products WHERE product_details ILIKE '%Latte%' OR product_details ILIKE '%Americano%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06076", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail.", "sql": "SELECT product_details FROM products WHERE product_details ILIKE '%Latte%' OR product_details ILIKE '%Americano%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06077", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the address content of the customer named \"Maudie Kertzmann\"?", "sql": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06078", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return the address content for the customer whose name is \"Maudie Kertzmann\".", "sql": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06079", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "How many customers are living in city \"Lake Geovannyton\"?", "sql": "SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06080", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the number of customers who live in the city called Lake Geovannyton.", "sql": "SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06081", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of customers who are living in Colorado?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06082", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of customers who live in Colorado state?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06083", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the list of cities that no customer is living in.", "sql": "SELECT city FROM addresses WHERE city NOT IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06084", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the cities no customers live in?", "sql": "SELECT city FROM addresses WHERE city NOT IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06085", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which city has the most customers living in?", "sql": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06086", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the city where the most customers live.", "sql": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06087", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Retrieve the list of all cities.", "sql": "SELECT DISTINCT city FROM addresses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06088", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "List all the distinct cities", "sql": "SELECT DISTINCT city FROM addresses;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06089", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the city with post code 255.", "sql": "SELECT city FROM addresses WHERE zip_postcode = 255;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06090", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which city is post code 255 located in?", "sql": "SELECT city FROM addresses WHERE zip_postcode = 255;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06093", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "List the countries having more than 4 addresses listed.", "sql": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06094", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "For which countries are there more than four distinct addresses listed?", "sql": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06095", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "List all the contact channel codes that were used less than 5 times.", "sql": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06096", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which contact channel codes were used less than 5 times?", "sql": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06097", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which contact channel has been used by the customer with name \"Tillman Ernser\"?", "sql": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06098", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the contact channel code that was used by the customer named \"Tillman Ernser\".", "sql": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06099", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", "sql": "SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06100", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\".", "sql": "SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06105", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name and active date of the customer that use email as the contact channel.", "sql": "SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06106", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the name and active date of the customers whose contact channel code is email?", "sql": "SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06107", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the name of the customer that made the order with the largest quantity?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06108", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of the customer who made the order of the largest amount of goods.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06109", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the name of the customer that has purchased the most items?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06110", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Give me the name of the customer who ordered the most items in total.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06111", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the payment method of the customer that has purchased the least quantity of items?", "sql": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name, t1.payment_method ORDER BY SUM(t3.order_quantity) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06112", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Tell me the payment method used by the customer who ordered the least amount of goods in total.", "sql": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name, t1.payment_method ORDER BY SUM(t3.order_quantity) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06113", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "How many types of products have Rodrick Heaney bought in total?", "sql": "SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06114", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the number of distinct products Rodrick Heaney has bought so far.", "sql": "SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06115", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the total quantity of products purchased by \"Rodrick Heaney\"?", "sql": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06116", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".", "sql": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06117", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "How many customers have at least one order with status \"Cancelled\"?", "sql": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06118", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Return the number of customers who have at least one order with \"Cancelled\" status.", "sql": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06119", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "How many orders have detail \"Second time\"?", "sql": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06120", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Tell me the number of orders with \"Second time\" as order detail.", "sql": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06121", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the customer name and date of the orders that have the status \"Delivered\".", "sql": "SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06122", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the customer name and date of the orders whose status is \"Delivered\".", "sql": "SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06123", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the total number of products that are in orders with status \"Cancelled\"?", "sql": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06124", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the total quantity of products associated with the orders in the \"Cancelled\" status.", "sql": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06125", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the total amount of products ordered before 2018-03-17 07:13:53.", "sql": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06126", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the total amount of products purchased before 2018-03-17 07:13:53?", "sql": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06127", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Who made the latest order?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06128", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of the customer who made an order most recently.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06129", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Which product has been ordered most number of times?", "sql": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id, t2.product_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06130", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the most frequently ordered product? Tell me the detail of the product", "sql": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id, t2.product_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06131", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name and ID of the product whose total order quantity is the largest.", "sql": "SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id, t2.product_details, t2.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06132", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the name and ID of the product bought the most.", "sql": "SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id, t2.product_details, t2.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06133", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "sql": "SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06134", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "sql": "SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06135", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the name of customers who did not pay with Cash.", "sql": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06136", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What is the name of customers who do not use Cash as payment method.", "sql": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06137", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the names of customers who never ordered product Latte.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06138", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are names of customers who never ordered product Latte.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06139", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the names of customers who never placed an order.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06140", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of customers who never made an order.", "sql": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06141", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "Find the names of customers who ordered both products Latte and Americano.", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06142", "db_id": "customers_and_addresses", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, address_content VARCHAR /* e.g. '08996 Brisa Lane Apt. 583', '120 Noble Radial' */, city VARCHAR /* e.g. 'East Julianaside', 'East Pascale' */, zip_postcode BIGINT, state_province_county VARCHAR /* e.g. 'Texas', 'Colorado' */, country VARCHAR /* e.g. 'USA' */, other_address_details VARCHAR);\nCREATE TABLE Customer_Addresses (customer_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type VARCHAR /* e.g. 'Residential', 'Billing' */, date_address_to TIMESTAMP);\nCREATE TABLE Customer_Contact_Channels (customer_id BIGINT, channel_code VARCHAR /* e.g. 'Handheld', 'Cell' */, active_from_date TIMESTAMP, active_to_date TIMESTAMP, contact_number VARCHAR /* e.g. '(068)656-5276x84466', '(155)830-6182' */);\nCREATE TABLE Customer_Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'Cancelled', 'Delivered' */, order_date TIMESTAMP, order_details VARCHAR /* e.g. 'Second time' */);\nCREATE TABLE Customers (customer_id BIGINT, payment_method VARCHAR /* e.g. 'Cheque', 'Credit Card' */, customer_name VARCHAR /* e.g. 'Alexane Kilback', 'Clifford Pagac' */, date_became_customer TIMESTAMP, other_customer_details VARCHAR /* e.g. 'VIP' */);\nCREATE TABLE Order_Items (order_id BIGINT, product_id BIGINT, order_quantity BIGINT);\nCREATE TABLE Products (product_id BIGINT, product_details VARCHAR /* e.g. 'Americano', 'Dove Chocolate' */);", "question": "What are the names of customers who have purchased both products Latte and Americano?", "sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06143", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "How many artists are there?", "sql": "SELECT COUNT(*) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06144", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Count the number of artists.", "sql": "SELECT COUNT(*) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06145", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "List the age of all music artists.", "sql": "SELECT Age FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06146", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the ages of all music artists?", "sql": "SELECT Age FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06147", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the average age of all artists?", "sql": "SELECT AVG(Age) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06148", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the average age across all artists.", "sql": "SELECT AVG(Age) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06149", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the famous titles of the artist \"Triumfall\"?", "sql": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06150", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the famous titles of the artist called \"Triumfall\".", "sql": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06151", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the distinct Famous release dates?", "sql": "SELECT DISTINCT (Famous_Release_date) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06152", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Give the distinct famous release dates for all artists.", "sql": "SELECT DISTINCT (Famous_Release_date) FROM artist;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06153", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the dates of ceremony and the results of all music festivals", "sql": "SELECT Date_of_ceremony, RESULT FROM music_festival;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06154", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the dates of ceremony and results for each music festival?", "sql": "SELECT Date_of_ceremony, RESULT FROM music_festival;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06155", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the category of music festivals with result \"Awarded\"?", "sql": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06156", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the categories of music festivals that have the result \"Awarded\".", "sql": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06157", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the maximum and minimum week on top of all volumes?", "sql": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06158", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Give the maximum and minimum weeks on top across all volumes.", "sql": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06159", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the songs in volumes with more than 1 week on top?", "sql": "SELECT Song FROM volume WHERE Weeks_on_Top > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06160", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Give the songs included in volumes that have more than 1 week on top.", "sql": "SELECT Song FROM volume WHERE Weeks_on_Top > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06161", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please list all songs in volumes in ascending alphabetical order.", "sql": "SELECT Song FROM volume ORDER BY Song;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06162", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the the songs in volumes, listed in ascending order?", "sql": "SELECT Song FROM volume ORDER BY Song;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06163", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "How many distinct artists do the volumes associate to?", "sql": "SELECT COUNT(DISTINCT Artist_ID) FROM volume;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06164", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Count the number of distinct artists who have volumes.", "sql": "SELECT COUNT(DISTINCT Artist_ID) FROM volume;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06165", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.", "sql": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06166", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?", "sql": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06167", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please show the songs that have result \"nominated\" at music festivals.", "sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06168", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the songs in volumes that have resulted in a nomination at music festivals?", "sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06169", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the issue dates of volumes associated with the artist \"Gorgoroth\"?", "sql": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06170", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the issue dates of volumes that are by the artist named Gorgoroth.", "sql": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06171", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the songs in volumes associated with the artist aged 32 or older?", "sql": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06172", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return names of songs in volumes that are by artists that are at least 32 years old.", "sql": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06173", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?", "sql": "SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06174", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.", "sql": "SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06175", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?", "sql": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06176", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.", "sql": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06177", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please list the age and famous title of artists in descending order of age.", "sql": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06178", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the famous titles and ages of each artist, listed in descending order by age?", "sql": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06179", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the famous release date of the artist with the oldest age?", "sql": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06180", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the famous release date for the oldest artist.", "sql": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06181", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please show the categories of the music festivals and the count.", "sql": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06182", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the number of music festivals of each category.", "sql": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06183", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the most common result of the music festival?", "sql": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06184", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the result that is most frequent at music festivals.", "sql": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06185", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please show the categories of the music festivals with count more than 1.", "sql": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06186", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the categories of music festivals for which there have been more than 1 music festival?", "sql": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06187", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the song in the volume with the maximum weeks on top?", "sql": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06188", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the song in the volume that has spent the most weeks on top?", "sql": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06189", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Find the famous titles of artists that do not have any volume.", "sql": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN (SELECT Artist_ID FROM volume);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06190", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the famous titles of artists who do not have any volumes?", "sql": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN (SELECT Artist_ID FROM volume);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06191", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.", "sql": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06192", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?", "sql": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06193", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?", "sql": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06194", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".", "sql": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06195", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What is the issue date of the volume with the minimum weeks on top?", "sql": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06196", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the issue date of the volume that has spent the fewest weeks on top.", "sql": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06197", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "How many distinct artists have volumes?", "sql": "SELECT COUNT(DISTINCT Artist_ID) FROM volume;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06198", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Count the number of artists who have had volumes.", "sql": "SELECT COUNT(DISTINCT Artist_ID) FROM volume;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06199", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.", "sql": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06200", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "How many music festivals have had each kind of result, ordered descending by count?", "sql": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06201", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "What are the issue dates of volumes associated with the artist aged 23 or younger?", "sql": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06202", "db_id": "music_4", "schema_text": "CREATE TABLE artist (Artist_ID BIGINT, Artist VARCHAR /* e.g. 'Ophiolatry', 'Tangorodrim' */, Age BIGINT, Famous_Title VARCHAR /* e.g. 'Antievangelistical Process (re-release)', 'Antithesis of All Flesh' */, Famous_Release_date VARCHAR /* e.g. '2009', 'January 21, 2008' */);\nCREATE TABLE music_festival (ID BIGINT, Music_Festival VARCHAR /* e.g. '34th England Academy Prize', '34th European Academy Prize' */, Date_of_ceremony VARCHAR /* e.g. '18 February 2011' */, Category VARCHAR /* e.g. 'Best Song', 'Best Lyrics' */, Volume BIGINT, Result VARCHAR /* e.g. 'Nominated', 'Awarded' */);\nCREATE TABLE volume (Volume_ID BIGINT, Volume_Issue VARCHAR /* e.g. '45:14 §', '45:15' */, Issue_Date VARCHAR /* e.g. '11 July - 18 July', '13 June' */, Weeks_on_Top DOUBLE, Song VARCHAR /* e.g. ' (I Just) Died in Your Arms ', ' Always ' */, Artist_ID BIGINT);", "question": "Return the issue dates of volumes by artists who are at most 23 years old?", "sql": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06203", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "How many roller coasters are there?", "sql": "SELECT COUNT(*) FROM roller_coaster;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06204", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "List the names of roller coasters by ascending order of length.", "sql": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06205", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "What are the lengths and heights of roller coasters?", "sql": "SELECT LENGTH, Height FROM roller_coaster;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06206", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "List the names of countries whose language is not \"German\".", "sql": "SELECT Name FROM country WHERE Languages <> 'German';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06207", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the statuses of roller coasters longer than 3300 or higher than 100.", "sql": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06208", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "What are the speeds of the longest roller coaster?", "sql": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06209", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "What is the average speed of roller coasters?", "sql": "SELECT AVG(Speed) FROM roller_coaster;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06210", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the different statuses and the numbers of roller coasters for each status.", "sql": "SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06211", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Please show the most common status of roller coasters.", "sql": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06212", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "List the status shared by more than two roller coaster.", "sql": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06213", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the park of the roller coaster with the highest speed.", "sql": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06214", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the names of roller coasters and names of country they are in.", "sql": "SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06215", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the names of countries that have more than one roller coaster.", "sql": "SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06216", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the name and population of the country that has the highest roller coaster.", "sql": "SELECT T1.Name, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06217", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "Show the names of countries and the average speed of roller coasters from each country.", "sql": "SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06218", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "How many countries do not have an roller coaster longer than 3000?", "sql": "SELECT COUNT(*) FROM country WHERE country_id NOT IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06219", "db_id": "roller_coaster", "schema_text": "CREATE TABLE country (Country_ID BIGINT, Name VARCHAR /* e.g. 'Austria', 'Finland' */, Population BIGINT, Area BIGINT, Languages VARCHAR /* e.g. 'Finnish Swedish', 'German' */);\nCREATE TABLE roller_coaster (Roller_Coaster_ID BIGINT, Name VARCHAR /* e.g. 'Boardwalk Bullet', 'Dauling Dragon' */, Park VARCHAR /* e.g. 'Gröna Lund', 'Happy Valley' */, Country_ID BIGINT, Length DOUBLE, Height DOUBLE, Speed DOUBLE, Opened VARCHAR /* e.g. '2011', '2012' */, Status VARCHAR /* e.g. 'Operating' */);", "question": "What are the country names, area and population which has both roller coasters with speed higher", "sql": "SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06220", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "How many different captain ranks are there?", "sql": "SELECT COUNT(DISTINCT rank) FROM captain;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06221", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Count the number of different ranks of captain.", "sql": "SELECT COUNT(DISTINCT rank) FROM captain;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06222", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "How many captains are in each rank?", "sql": "SELECT COUNT(*), rank FROM captain GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06223", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Count the number of captains that have each rank.", "sql": "SELECT COUNT(*), rank FROM captain GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06224", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "How many captains with younger than 50 are in each rank?", "sql": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06225", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Count the number of captains younger than 50 of each rank.", "sql": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06226", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Sort all captain names by their ages from old to young.", "sql": "SELECT name FROM captain ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06227", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names of captains, sorted by age descending?", "sql": "SELECT name FROM captain ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06228", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name, class and rank of all captains.", "sql": "SELECT name, CLASS, rank FROM captain;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06229", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names, classes, and ranks of all captains?", "sql": "SELECT name, CLASS, rank FROM captain;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06230", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Which rank is the most common among captains?", "sql": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06231", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Return the rank for which there are the fewest captains.", "sql": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06232", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Which classes have more than two captains?", "sql": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06233", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Give the classes that have more than two captains.", "sql": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06234", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name of captains whose rank are either Midshipman or Lieutenant.", "sql": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06235", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names of captains that have either the rank Midshipman or Lieutenant?", "sql": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06236", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the average and minimum age of captains in different class?", "sql": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06237", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Return the average and minimum age of captains in each class.", "sql": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06238", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.", "sql": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06239", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?", "sql": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06240", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the captain rank that has no captain in Third-rate ship of the line class.", "sql": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06241", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?", "sql": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06242", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What is the name of the youngest captain?", "sql": "SELECT name FROM captain ORDER BY age LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06243", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Return the name of the youngest captain.", "sql": "SELECT name FROM captain ORDER BY age LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06244", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "how many ships are there?", "sql": "SELECT COUNT(*) FROM ship;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06245", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Count the number of ships.", "sql": "SELECT COUNT(*) FROM ship;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06246", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name, type, and flag of the ship that is built in the most recent year.", "sql": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06247", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What is the name, type, and flag of the ship that was built in the most recent year?", "sql": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06248", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Group by ships by flag, and return number of ships that have each flag.", "sql": "SELECT COUNT(*), flag FROM ship GROUP BY flag;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06249", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the different ship flags, and how many ships have each?", "sql": "SELECT COUNT(*), flag FROM ship GROUP BY flag;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06250", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Which flag is most widely used among all ships?", "sql": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06251", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Return the flag that is most common among all ships.", "sql": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06252", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "List all ship names in the order of built year and class.", "sql": "SELECT name FROM ship ORDER BY built_year, CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06253", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names of ships, ordered by year they were built and their class?", "sql": "SELECT name FROM ship ORDER BY built_year, CLASS;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06254", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the ship type that are used by both ships with Panama and Malta flags.", "sql": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06255", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What types of ships have both ships that have Panama Flags and Malta flags?", "sql": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06256", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "In which year were most of ships built?", "sql": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06257", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What is the year in which most ships were built?", "sql": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06258", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name of the ships that have more than one captain.", "sql": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id, t1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06259", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names of ships that have more than one captain?", "sql": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id, t1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06260", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "what are the names and classes of the ships that do not have any captain yet?", "sql": "SELECT name, CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06261", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Return the names and classes of ships that do not have a captain?", "sql": "SELECT name, CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06264", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.", "sql": "SELECT name, flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06265", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?", "sql": "SELECT name, flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06266", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", "sql": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06267", "db_id": "ship_1", "schema_text": "CREATE TABLE captain (Captain_ID BIGINT, Name VARCHAR /* e.g. 'Captain Beves Conway', 'Captain Gilbert Pears' */, Ship_ID BIGINT, age BIGINT, Class VARCHAR /* e.g. 'Third-rate ship of the line', 'Armed schooner' */, Rank VARCHAR /* e.g. 'Midshipman', 'Lieutenant' */);\nCREATE TABLE Ship (Ship_ID BIGINT, Name VARCHAR /* e.g. 'HM Cutter Avenger', 'HM Schooner Hotspur' */, Type VARCHAR /* e.g. 'Panamax' */, Built_Year DOUBLE, Class VARCHAR /* e.g. 'KR', 'GL' */, Flag VARCHAR /* e.g. 'Panama', 'Malta' */);", "question": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", "sql": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06268", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is id of the city that hosted events in the most recent year?", "sql": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06269", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the city that hosted some events in the most recent year. What is the id of this city?", "sql": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06270", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?", "sql": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06271", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is the match id of the competition called \"1994 FIFA World Cup qualification\"?", "sql": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06272", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the cities which were once a host city after 2010?", "sql": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06273", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities served as a host city after 2010?", "sql": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06274", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which city has hosted the most events?", "sql": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06275", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the city that hosted the most events.", "sql": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06276", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", "sql": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = 'Nanjing ( Jiangsu )' AND T3.competition = '1994 FIFA World Cup qualification';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06277", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", "sql": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = 'Nanjing ( Jiangsu )' AND T3.competition = '1994 FIFA World Cup qualification';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06278", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Give me the temperature of Shanghai in January.", "sql": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06279", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is the temperature of \"Shanghai\" city in January?", "sql": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06280", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is the host year of city \"Taizhou ( Zhejiang )\"?", "sql": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06281", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?", "sql": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06282", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which three cities have the largest regional population?", "sql": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06283", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What are the three largest cities in terms of regional population?", "sql": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06284", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which city has the lowest GDP? Please list the city name and its GDP.", "sql": "SELECT city, GDP FROM city ORDER BY GDP LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06285", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What is the city with the smallest GDP? Return the city and its GDP.", "sql": "SELECT city, GDP FROM city ORDER BY GDP LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06286", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which city has the highest temperature in February?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06287", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "In February, which city marks the highest temperature?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06288", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06289", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06290", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06291", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have lower temperature in March than in July and have been once host cities?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06292", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06293", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have lower temperature in March than in Dec and have never served as host cities?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06294", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06295", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?", "sql": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06296", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Please give me a list of cities whose regional population is over 10000000.", "sql": "SELECT city FROM city WHERE regional_population > 10000000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06297", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have regional population above 10000000?", "sql": "SELECT city FROM city WHERE regional_population > 10000000;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06298", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.", "sql": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06299", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have regional population above 8000000 or below 5000000?", "sql": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06300", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the number of matches in different competitions.", "sql": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06301", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "For each competition, count the number of matches.", "sql": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06302", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "List venues of all matches in the order of their dates starting from the most recent one.", "sql": "SELECT venue FROM MATCH ORDER BY date DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06303", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What are the venues of all the matches? Sort them in the descending order of match date.", "sql": "SELECT venue FROM MATCH ORDER BY date DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06304", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "what is the GDP of the city with the largest population.", "sql": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06305", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Find the GDP of the city with the largest regional population.", "sql": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06306", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "What are the GDP and population of the city that already served as a host more than once?", "sql": "SELECT t1.gdp, t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City, t1.gdp, t1.Regional_Population HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06307", "db_id": "city_record", "schema_text": "CREATE TABLE city (City_ID BIGINT, City VARCHAR /* e.g. 'Changzhou ( Jiangsu )', 'Hangzhou ( Zhejiang )' */, Hanzi VARCHAR /* e.g. '上海', '南京' */, Hanyu_Pinyin VARCHAR /* e.g. 'Chángzhōu', 'Hángzhōu' */, Regional_Population BIGINT, GDP DOUBLE);\nCREATE TABLE hosting_city (Year BIGINT, Match_ID BIGINT, Host_City BIGINT);\nCREATE TABLE match (Match_ID BIGINT, Date VARCHAR /* e.g. '23 July 1992', '18 February 1992' */, Venue VARCHAR, Score VARCHAR /* e.g. '1-0', '3-0' */, Result VARCHAR /* e.g. '5-1', '2-0' */, Competition VARCHAR /* e.g. '1994 FIFA World Cup qualification', '2002 FIFA World Cup qualification' */);\nCREATE TABLE temperature (City_ID BIGINT, Jan DOUBLE, Feb DOUBLE, Mar DOUBLE, Apr DOUBLE, Jun DOUBLE, Jul DOUBLE, Aug DOUBLE, Sep DOUBLE, Oct DOUBLE, Nov DOUBLE, Dec DOUBLE);", "question": "Which cities have served as host cities more than once? Return me their GDP and population.", "sql": "SELECT t1.gdp, t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City, t1.gdp, t1.Regional_Population HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06348", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "How many drivers are there?", "sql": "SELECT COUNT(*) FROM driver;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06349", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the name, home city, and age for all drivers.", "sql": "SELECT name, home_city, age FROM driver;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06350", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the party and the number of drivers in each party.", "sql": "SELECT party, COUNT(*) FROM driver GROUP BY party;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06351", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the name of drivers in descending order of age.", "sql": "SELECT name FROM driver ORDER BY age DESC;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06352", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show all different home cities.", "sql": "SELECT DISTINCT home_city FROM driver;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06353", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the home city with the most number of drivers.", "sql": "SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06354", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the party with drivers from Hartford and drivers older than 40.", "sql": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06355", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show home city where at least two drivers older than 40 are from.", "sql": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06356", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show all home cities except for those having a driver older than 40.", "sql": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06357", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the names of the drivers without a school bus.", "sql": "SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06358", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the types of schools that have two schools.", "sql": "SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06359", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the school name and driver name for all school buses.", "sql": "SELECT T2.school, T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06360", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "What is the maximum, minimum and average years spent working on a school bus?", "sql": "SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06361", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the school name and type for schools without a school bus.", "sql": "SELECT school, TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06362", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "Show the type of school and the number of buses for each type.", "sql": "SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06363", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "How many drivers are from Hartford city or younger than 40?", "sql": "SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06364", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "List names for drivers from Hartford city and younger than 40.", "sql": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06365", "db_id": "school_bus", "schema_text": "CREATE TABLE driver (Driver_ID BIGINT, Name VARCHAR /* e.g. 'Angel Acre', 'Brandon McGee' */, Party VARCHAR /* e.g. 'Dem', 'Rep' */, Home_city VARCHAR /* e.g. 'Hartford', 'East Hartford' */, Age BIGINT);\nCREATE TABLE school (School_ID BIGINT, Grade VARCHAR /* e.g. '1st-3rd grade', '4th grade' */, School VARCHAR /* e.g. 'Columbia University', 'Harvard Law School' */, Location VARCHAR /* e.g. 'Honolulu, Hawaii', 'Jakarta, Indonesia' */, Type VARCHAR /* e.g. 'Private', 'Public' */);\nCREATE TABLE school_bus (School_ID BIGINT, Driver_ID BIGINT, Years_Working BIGINT, If_full_time VARCHAR /* e.g. 'T', 'F' */);", "question": "find the name of driver who is driving the school bus with the longest working history.", "sql": "SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06366", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "How many flights have a velocity larger than 200?", "sql": "SELECT COUNT(*) FROM flight WHERE velocity > 200;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06367", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.", "sql": "SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude ASC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06368", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "List the id, country, city and name of the airports ordered alphabetically by the name.", "sql": "SELECT id, country, city, name FROM airport ORDER BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06369", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What is maximum group equity shareholding of the companies?", "sql": "SELECT MAX(group_equity_shareholding) FROM operate_company;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06370", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What is the velocity of the pilot named 'Thompson'?", "sql": "SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06371", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What are the names and types of the companies that have ever operated a flight?", "sql": "SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06372", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What are the names of the airports which are not in the country 'Iceland'?", "sql": "SELECT name FROM airport WHERE country <> 'Iceland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06373", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What are the distinct types of the companies that have operated any flights with velocity less than 200?", "sql": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06374", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What are the ids and names of the companies that operated more than one flight?", "sql": "SELECT T1.id, T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06376", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?", "sql": "SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06377", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "What is the most common company type, and how many are there?", "sql": "SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06378", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "How many airports haven't the pilot 'Thompson' driven an aircraft?", "sql": "SELECT COUNT(*) FROM airport WHERE id NOT IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06379", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.", "sql": "SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06380", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "Which of the airport names contains the word 'international'?", "sql": "SELECT name FROM airport WHERE name ILIKE '%international%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06381", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "How many companies operates airlines in each airport?", "sql": "SELECT T3.id, COUNT(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06382", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "how many airports are there in each country?", "sql": "SELECT COUNT(*), country FROM airport GROUP BY country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06383", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "which countries have more than 2 airports?", "sql": "SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06384", "db_id": "flight_company", "schema_text": "CREATE TABLE airport (id BIGINT, City VARCHAR /* e.g. 'Akureyri', 'Amsterdam' */, Country VARCHAR /* e.g. 'United States', 'Belgium' */, IATA VARCHAR /* e.g. 'AEY', 'AMS' */, ICAO VARCHAR /* e.g. 'BIAR', 'EBBR' */, name VARCHAR /* e.g. 'Akureyri Airport', 'Baltimore-Washington Airport' */);\nCREATE TABLE flight (id BIGINT, Vehicle_Flight_number VARCHAR /* e.g. 'M2-F1 #0', 'M2-F1 #1' */, Date VARCHAR /* e.g. 'August 16, 1963', 'August 30, 1965' */, Pilot VARCHAR /* e.g. 'Thompson', 'Peterson' */, Velocity DOUBLE, Altitude DOUBLE, airport_id BIGINT, company_id BIGINT);\nCREATE TABLE operate_company (id BIGINT, name VARCHAR /* e.g. 'Air China', 'Air China Cargo' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Principal_activities VARCHAR /* e.g. 'Cargo airline', 'Catering services' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE);", "question": "which pilot is in charge of the most number of flights?", "sql": "SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06469", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the total number of scientists.", "sql": "SELECT COUNT(*) FROM scientists;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06470", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "How many scientists are there?", "sql": "SELECT COUNT(*) FROM scientists;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06471", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the total hours of all projects.", "sql": "SELECT SUM(hours) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06472", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the total number of hours for all projects?", "sql": "SELECT SUM(hours) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06473", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "How many different scientists are assigned to any project?", "sql": "SELECT COUNT(DISTINCT scientist) FROM assignedto;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06474", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Count the number of different scientists assigned to any project.", "sql": "SELECT COUNT(DISTINCT scientist) FROM assignedto;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06475", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the number of distinct projects.", "sql": "SELECT COUNT(DISTINCT name) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06476", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "How many different projects are there?", "sql": "SELECT COUNT(DISTINCT name) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06477", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the average hours of all projects.", "sql": "SELECT AVG(hours) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06478", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the average hours across all projects?", "sql": "SELECT AVG(hours) FROM projects;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06479", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of project that continues for the longest time.", "sql": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06480", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the name of the project with the most hours?", "sql": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06481", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "List the name of all projects that are operated longer than the average working hours of all projects.", "sql": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06482", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of projects that have taken longer than the average number of hours for all projects?", "sql": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06483", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name and hours of project that has the most number of scientists.", "sql": "SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project, T1.name, T1.hours ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06484", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the name and hours for the project which has the most scientists assigned to it?", "sql": "SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project, T1.name, T1.hours ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06485", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to.", "sql": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name ILIKE '%Smith%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06486", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", "sql": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name ILIKE '%Smith%';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06487", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", "sql": "SELECT SUM(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06488", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", "sql": "SELECT SUM(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06489", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of projects that require between 100 and 300 hours of work.", "sql": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06490", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of projects that require between 100 and 300 hours?", "sql": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06491", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", "sql": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06492", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", "sql": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06493", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "List the names of all scientists sorted in alphabetical order.", "sql": "SELECT name FROM scientists ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06494", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of all the scientists in alphabetical order?", "sql": "SELECT name FROM scientists ORDER BY name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06495", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the number of scientists involved for each project name.", "sql": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06496", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the naems of all the projects, and how many scientists were assigned to each of them?", "sql": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06497", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the number of scientists involved for the projects that require more than 300 hours.", "sql": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06498", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", "sql": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06499", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the number of projects which each scientist is working on and scientist's name.", "sql": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06500", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of the scientists, and how many projects are each of them working on?", "sql": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06501", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", "sql": "SELECT T3.ssn, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06502", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the SSN and names of scientists working on the project with the most hours?", "sql": "SELECT T3.ssn, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06503", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of scientists who are assigned to some project.", "sql": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06504", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of scientists who are assigned to any project?", "sql": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06505", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Select the project names which are not assigned yet.", "sql": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06506", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of projects that have not been assigned?", "sql": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06507", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the name of scientists who are not assigned to any project.", "sql": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06508", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of scientists who have not been assigned a project?", "sql": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06509", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the number of scientists who are not assigned to any project.", "sql": "SELECT COUNT(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06510", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "How many scientists do not have any projects assigned to them?", "sql": "SELECT COUNT(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06511", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find the names of scientists who are not working on the project with the highest hours.", "sql": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06512", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of scientists who are not working on the project with the most hours?", "sql": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06513", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.", "sql": "SELECT T1.Name, T3.Name, T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06514", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.", "sql": "SELECT T1.Name, T3.Name, T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06515", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", "sql": "SELECT T2.name, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MIN(hours) FROM projects);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06516", "db_id": "scientist_1", "schema_text": "CREATE TABLE AssignedTo (Scientist BIGINT, Project VARCHAR /* e.g. 'Ast3', 'AeH3' */);\nCREATE TABLE Projects (Code VARCHAR /* e.g. 'AeH1', 'AeH2' */, Name VARCHAR /* e.g. 'A Magnetic Primer Designer', 'A Matter of Time' */, Hours BIGINT);\nCREATE TABLE Scientists (SSN BIGINT, Name VARCHAR /* e.g. 'Anand Manikutty', 'Carol Smith' */);", "question": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", "sql": "SELECT T2.name, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MIN(hours) FROM projects);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06517", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the name of the highest rated wine?", "sql": "SELECT Name FROM WINE ORDER BY Score LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06518", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the name of the wine with the highest score.", "sql": "SELECT Name FROM WINE ORDER BY Score LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06519", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Which winery is the wine that has the highest score from?", "sql": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06520", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the winery at which the wine with the highest score was made?", "sql": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06521", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the names of all wines produced in 2008.", "sql": "SELECT Name FROM WINE WHERE YEAR = '2008';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06522", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of all wines produced in 2008?", "sql": "SELECT Name FROM WINE WHERE YEAR = '2008';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06523", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the grapes and appelations of all wines.", "sql": "SELECT Grape, Appelation FROM WINE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06524", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the grapes and appelations of each wine?", "sql": "SELECT Grape, Appelation FROM WINE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06525", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the names and scores of all wines.", "sql": "SELECT Name, Score FROM WINE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06526", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names and scores of all wines?", "sql": "SELECT Name, Score FROM WINE;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06527", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the area and county of all appelations.", "sql": "SELECT Area, County FROM APPELLATIONS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06528", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the areas and counties for all appelations?", "sql": "SELECT Area, County FROM APPELLATIONS;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06529", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the prices of wines produced before the year of 2010?", "sql": "SELECT Price FROM WINE WHERE YEAR < 2010;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06530", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Return the prices of wines produced before 2010.", "sql": "SELECT Price FROM WINE WHERE YEAR < 2010;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06531", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the names of all distinct wines that have scores higher than 90.", "sql": "SELECT Name FROM WINE WHERE score > 90;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06532", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines with scores higher than 90?", "sql": "SELECT Name FROM WINE WHERE score > 90;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06533", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the names of all distinct wines that are made of red color grape.", "sql": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06534", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines made from red grapes?", "sql": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06535", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the names of all distinct wines that have appellations in North Coast area.", "sql": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06536", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the distinct names of wines that have appellations in the North Coast area?", "sql": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06537", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "How many wines are produced at Robert Biale winery?", "sql": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06538", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Count the number of wines produced at Robert Biale winery.", "sql": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06539", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "How many appelations are in Napa Country?", "sql": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06540", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Count the number of appelations in Napa County.", "sql": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06541", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give me the average prices of wines that are produced by appelations in Sonoma County.", "sql": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06542", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the average price of wines produced in appelations in Sonoma County?", "sql": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06543", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names and scores of wines that are made of white color grapes?", "sql": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06544", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the names and scores of wines made from white grapes.", "sql": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06545", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.", "sql": "SELECT MAX(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'Central Coast' AND T2.year < 2005;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06546", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", "sql": "SELECT MAX(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'Central Coast' AND T2.year < 2005;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06547", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", "sql": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White' AND T2.score > 90;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06548", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the white grape used to produce wines with scores above 90.", "sql": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White' AND T2.score > 90;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06549", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the wines that have prices higher than 50 and made of Red color grapes?", "sql": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06550", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines made from red grapes and with prices above 50?", "sql": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06551", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the wines that have prices lower than 50 and have appelations in Monterey county?", "sql": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06552", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the neames of wines with prices below 50 and with appelations in Monterey county.", "sql": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06553", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the numbers of wines for different grapes?", "sql": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06554", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "How many wines are there for each grape?", "sql": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06555", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the average prices of wines for different years?", "sql": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06556", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the average prices of wines for each each?", "sql": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06557", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.", "sql": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06558", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.", "sql": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06559", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the names of all distinct wines in alphabetical order.", "sql": "SELECT DISTINCT Name FROM WINE ORDER BY Name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06560", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines, sorted in alphabetical order?", "sql": "SELECT DISTINCT Name FROM WINE ORDER BY Name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06563", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the area of the appelation that produces the highest number of wines before the year of 2010?", "sql": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation, T1.Area, T2.year HAVING T2.year < 2010 ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06564", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the area for the appelation which produced the most wines prior to 2010?", "sql": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation, T1.Area, T2.year HAVING T2.year < 2010 ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06565", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the color of the grape whose wine products has the highest average price?", "sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape, T1.Color ORDER BY AVG(Price) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06566", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the color of the grape whose wine products have the highest average price?", "sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape, T1.Color ORDER BY AVG(Price) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06567", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.", "sql": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06568", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the distinct names of wines made before 2000 or after 2010.", "sql": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06569", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the distinct winery of wines having price between 50 and 100.", "sql": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06570", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the distinct wineries which produce wines costing between 50 and 100?", "sql": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06573", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the maximum price and score of wines produced by St. Helena appelation?", "sql": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06574", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the maximum price and score for wines produced in the appelation St. Helena.", "sql": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06575", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the maximum price and score of wines in each year?", "sql": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06576", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the maximum price and score of wines for each year?", "sql": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06577", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the average price and score of wines grouped by appelation?", "sql": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06578", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the average price and score of wines for each appelation?", "sql": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06579", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the wineries that have at least four wines.", "sql": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06580", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Which wineries produce at least four wines?", "sql": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06581", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the country of all appelations who have at most three wines.", "sql": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation, T1.County HAVING COUNT(*) <= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06582", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the countries for appelations with at most 3 wines?", "sql": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation, T1.County HAVING COUNT(*) <= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06583", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines whose production year are before the year of all wines by Brander winery?", "sql": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06584", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines produced before any wine from the Brander winery?", "sql": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander');", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06585", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the names of wines that are more expensive then all wines made in the year 2006?", "sql": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06586", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Give the names of wines with prices above any wine produced in 2006.", "sql": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06589", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.", "sql": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06590", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?", "sql": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06593", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.", "sql": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06594", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What are the appelations for wines produced after 2008 but not in the Central Coast area?", "sql": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06595", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the average price of wines that are not produced from Sonoma county.", "sql": "SELECT AVG(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06596", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the average price for wines not produced in Sonoma county?", "sql": "SELECT AVG(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06597", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "Find the county where produces the most number of wines with score higher than 90.", "sql": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06598", "db_id": "wine_1", "schema_text": "CREATE TABLE appellations (No BIGINT, Appelation VARCHAR, County VARCHAR /* e.g. 'Napa', 'Sonoma' */, State VARCHAR /* e.g. 'California' */, Area VARCHAR /* e.g. 'North Coast', 'Central Coast' */, isAVA VARCHAR /* e.g. 'Yes', 'No' */);\nCREATE TABLE grapes (ID BIGINT, Grape VARCHAR /* e.g. 'Barbera', 'Cabernet Franc' */, Color VARCHAR /* e.g. 'Red', 'White' */);\nCREATE TABLE wine (No BIGINT, Grape VARCHAR /* e.g. 'Pinot Noir', 'Chardonnay' */, Winery VARCHAR, Appelation VARCHAR, State VARCHAR /* e.g. 'California' */, Name VARCHAR, Year BIGINT, Price BIGINT, Score BIGINT, Cases VARCHAR, Drink VARCHAR /* e.g. 'now', '2012' */);", "question": "What is the county that produces the most wines scoring higher than 90?", "sql": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06599", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "How many train stations are there?", "sql": "SELECT COUNT(*) FROM station;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06600", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the name, location, and number of platforms for all stations.", "sql": "SELECT name, LOCATION, number_of_platforms FROM station;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06601", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "What are all locations of train stations?", "sql": "SELECT DISTINCT LOCATION FROM station;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06602", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the names and total passengers for all train stations not in London.", "sql": "SELECT name, total_passengers FROM station WHERE LOCATION <> 'London';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06603", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the names and main services for train stations that have the top three total number of passengers.", "sql": "SELECT name, main_services FROM station ORDER BY total_passengers DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06604", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "sql": "SELECT AVG(total_passengers), MAX(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06605", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show all locations and the total number of platforms and passengers for all train stations in each location.", "sql": "SELECT LOCATION, SUM(number_of_platforms), SUM(total_passengers) FROM station GROUP BY LOCATION;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06606", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.", "sql": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06607", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show all locations which don't have a train station with at least 15 platforms.", "sql": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06608", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the location with most number of train stations.", "sql": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06609", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the name, time, and service for all trains.", "sql": "SELECT name, TIME, service FROM train;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06610", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the number of trains", "sql": "SELECT COUNT(*) FROM train;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06611", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the name and service for all trains in order by time.", "sql": "SELECT name, service FROM train ORDER BY TIME;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06612", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the station name and number of trains in each station.", "sql": "SELECT T2.name, COUNT(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id, T2.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06613", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "show the train name and station name for each train.", "sql": "SELECT T2.name, T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06614", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show all train names and times in stations in London in descending order by train time.", "sql": "SELECT T3.name, T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06615", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the station name with greatest number of trains.", "sql": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06616", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show the station name with at least two trains.", "sql": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id, T2.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06617", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show all locations with only 1 station.", "sql": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06618", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Show station names without any trains.", "sql": "SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06619", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", "sql": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = 'Ananthapuri Express' INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = 'Guruvayur Express';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06620", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "Find the names of the trains that do not pass any station located in London.", "sql": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = 'London');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06621", "db_id": "train_station", "schema_text": "CREATE TABLE station (Station_ID BIGINT, Name VARCHAR /* e.g. 'Birmingham New Street', 'East Croydon' */, Annual_entry_exit DOUBLE, Annual_interchanges DOUBLE, Total_Passengers DOUBLE, Location VARCHAR /* e.g. 'London', 'Birmingham' */, Main_Services VARCHAR /* e.g. 'West Coast Main Line', 'Brighton Main Line' */, Number_of_Platforms BIGINT);\nCREATE TABLE train (Train_ID BIGINT, Name VARCHAR /* e.g. 'Ananthapuri Express', 'Guruvayur Express' */, Time VARCHAR /* e.g. '04:20', '04:55' */, Service VARCHAR /* e.g. 'Daily' */);\nCREATE TABLE train_station (Train_ID BIGINT, Station_ID BIGINT);", "question": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.", "sql": "SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit, Annual_interchanges;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06622", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List all vehicle id", "sql": "SELECT vehicle_id FROM Vehicles;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06623", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the ids of all vehicles?", "sql": "SELECT vehicle_id FROM Vehicles;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06624", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many vehicle in total?", "sql": "SELECT COUNT(*) FROM Vehicles;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06625", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many vehicles exist?", "sql": "SELECT COUNT(*) FROM Vehicles;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06626", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Show the detail of vehicle with id 1.", "sql": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06627", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the details of the car with id 1?", "sql": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06628", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List the first name middle name and last name of all staff.", "sql": "SELECT first_name, middle_name, last_name FROM Staff;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06629", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the first, middle, and last names of all staff?", "sql": "SELECT first_name, middle_name, last_name FROM Staff;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06630", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", "sql": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06631", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the date of birth for the staff member named Janessa Sawayn?", "sql": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06632", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", "sql": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06633", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did the staff member named Janessa Sawayn join the company?", "sql": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06634", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", "sql": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06635", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did the staff member Janessa Sawayn leave the company?", "sql": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06636", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many staff have the first name Ludie?", "sql": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06637", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many employees have a first name of Ludie?", "sql": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06638", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the nickname of staff with first name as Janessa and last name as Sawayn?", "sql": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06639", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the nickname of the employee named Janessa Sawayn?", "sql": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06640", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many staff in total?", "sql": "SELECT COUNT(*) FROM Staff;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06641", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many employees are there?", "sql": "SELECT COUNT(*) FROM Staff;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06642", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which city does staff with first name as Janessa and last name as Sawayn live?", "sql": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06643", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "In what city does Janessa Sawayn live?", "sql": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06644", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?", "sql": "SELECT T1.country, T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06645", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "In which country and state does Janessa Sawayn live?", "sql": "SELECT T1.country, T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06646", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", "sql": "SELECT SUM(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Rylan' AND T2.last_name = 'Goodwin';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06647", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How long is the total lesson time took by the customer named Rylan Goodwin?", "sql": "SELECT SUM(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Rylan' AND T2.last_name = 'Goodwin';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06648", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?", "sql": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06649", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the zip code of the hosue of the employee named Janessa Sawayn?", "sql": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06650", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many staff live in state Georgia?", "sql": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06651", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many employees live in Georgia?", "sql": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06652", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Find out the first name and last name of staff lived in city Damianfort.", "sql": "SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = 'Damianfort';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06653", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the first and last name of all employees who live in the city Damianfort?", "sql": "SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = 'Damianfort';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06654", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which city lives most of staffs? List the city name and number of staffs.", "sql": "SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06655", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "In which city do the most employees live and how many of them live there?", "sql": "SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06656", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List the states which have between 2 to 4 staffs living there.", "sql": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING COUNT(*) BETWEEN 2 AND 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06657", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the names of the states that have 2 to 4 employees living there?", "sql": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING COUNT(*) BETWEEN 2 AND 4;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06658", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List the first name and last name of all customers.", "sql": "SELECT first_name, last_name FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06659", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the first and last names for all customers?", "sql": "SELECT first_name, last_name FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06660", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List email address and birthday of customer whose first name as Carole.", "sql": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06661", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the email addresses and date of births for all customers who have a first name of Carole?", "sql": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06662", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List phone number and email address of customer with more than 2000 outstanding balance.", "sql": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06663", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?", "sql": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06664", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", "sql": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06665", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", "sql": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06666", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When are the birthdays of customer who are classified as 'Good Customer' status?", "sql": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06667", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the date of birth of every customer whose status code is 'Good Customer'?", "sql": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06668", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did customer with first name as Carole and last name as Bernhard became a customer?", "sql": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06669", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "When did Carole Bernhard first become a customer?", "sql": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06670", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many customers in total?", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06671", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many customers are there?", "sql": "SELECT COUNT(*) FROM Customers;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06672", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List all customer status codes and the number of customers having each status code.", "sql": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06673", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "For each customer status code, how many customers are classified that way?", "sql": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06674", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which customer status code has least number of customers?", "sql": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06675", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the status code with the least number of customers?", "sql": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06676", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Rylan' AND T2.last_name = 'Goodwin' AND T1.lesson_status_code = 'Completed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06677", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons did the customer Ryan Goodwin complete?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Rylan' AND T2.last_name = 'Goodwin' AND T1.lesson_status_code = 'Completed';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06678", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is maximum, minimum and average amount of outstanding of customer?", "sql": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06679", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the maximum, minimum, and average amount of money outsanding for all customers?", "sql": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06680", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.", "sql": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06681", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?", "sql": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06682", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List first name and last name of customers lived in city Lockmanfurt.", "sql": "SELECT T1.first_name, T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = 'Lockmanfurt';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06683", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the first and last names of all customers who lived in Lockmanfurt?", "sql": "SELECT T1.first_name, T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = 'Lockmanfurt';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06684", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which country does customer with first name as Carole and last name as Bernhard lived in?", "sql": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = 'Carole' AND T1.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06685", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the country in which the customer Carole Bernhard lived?", "sql": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = 'Carole' AND T1.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06686", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is zip code of customer with first name as Carole and last name as Bernhard?", "sql": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = 'Carole' AND T1.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06687", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the zip code of the customer Carole Bernhard?", "sql": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = 'Carole' AND T1.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06688", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which city does has most number of customers?", "sql": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06689", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the city with the most customers?", "sql": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06690", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How much in total does customer with first name as Carole and last name as Bernhard paid?", "sql": "SELECT SUM(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Carole' AND T2.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06691", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the total amount of moeny paid by the customer Carole Bernhard?", "sql": "SELECT SUM(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Carole' AND T2.last_name = 'Bernhard';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06692", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List the number of customers that did not have any payment history.", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Customer_Payments);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06693", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many customers have no payment histories?", "sql": "SELECT COUNT(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Customer_Payments);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06694", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List first name and last name of customers that have more than 2 payments.", "sql": "SELECT T2.first_name, T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.first_name, T2.last_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06695", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the first and last names of all customers with more than 2 payments?", "sql": "SELECT T2.first_name, T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id, T2.first_name, T2.last_name HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06696", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List all payment methods and number of payments using each payment methods.", "sql": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06697", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "For each payment method, how many payments were made?", "sql": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06698", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons were in cancelled state?", "sql": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06699", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons have been cancelled?", "sql": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06700", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", "sql": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn' AND nickname ILIKE '%s%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06701", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", "sql": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn' AND nickname ILIKE '%s%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06702", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons taught by staff whose first name has letter 'a' in it?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name ILIKE '%a%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06703", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name ILIKE '%a%';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06704", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?", "sql": "SELECT SUM(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06705", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the total time for all lessons taught by Janessa Sawayn?", "sql": "SELECT SUM(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06706", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", "sql": "SELECT AVG(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06707", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the average price for a lesson taught by Janessa Sawayn?", "sql": "SELECT AVG(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06708", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lesson does customer with first name Ray took?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06709", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "How many lessons did the customer with the first name Ray take?", "sql": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06710", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "Which last names are both used by customers and by staff?", "sql": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06711", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What are the last names that are used by customers and staff?", "sql": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06712", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the first name of the staff who did not give any lesson?", "sql": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06713", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the first name of all employees who do not give any lessons?", "sql": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06714", "db_id": "driving_school", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '00704 Zoe Alley', '053 Quigley Island' */, city VARCHAR /* e.g. 'Buckridgehaven', 'Damianfort' */, zip_postcode VARCHAR /* e.g. '00005', '08938' */, state_province_county VARCHAR /* e.g. 'Connecticut', 'Georgia' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Customer_Payments (customer_id BIGINT, datetime_payment TIMESTAMP, payment_method_code VARCHAR /* e.g. 'Direct Debit', 'Credit Card' */, amount_payment DOUBLE);\nCREATE TABLE Customers (customer_id BIGINT, customer_address_id BIGINT, customer_status_code VARCHAR /* e.g. 'Bad Customer', 'Good Customer' */, date_became_customer TIMESTAMP, date_of_birth TIMESTAMP, first_name VARCHAR /* e.g. 'Amya', 'Carole' */, last_name VARCHAR /* e.g. 'Bernhard', 'Bruen' */, amount_outstanding DOUBLE, email_address VARCHAR /* e.g. 'afranecki@example.com', 'asha.kilback@example.org' */, phone_number VARCHAR /* e.g. '(297)122-0086', '(662)490-3108' */, cell_mobile_phone_number VARCHAR /* e.g. '(630)964-2426', '(780)719-4206x033' */);\nCREATE TABLE Lessons (lesson_id BIGINT, customer_id BIGINT, lesson_status_code VARCHAR /* e.g. 'Cancelled', 'Completed' */, staff_id BIGINT, vehicle_id BIGINT, lesson_date TIMESTAMP, lesson_time BIGINT, price DOUBLE);\nCREATE TABLE Staff (staff_id BIGINT, staff_address_id BIGINT, nickname VARCHAR /* e.g. 'bkunze', 'bogisich.geovany' */, first_name VARCHAR /* e.g. 'Camylle', 'Ernestina' */, middle_name VARCHAR /* e.g. 'Amara', 'Benny' */, last_name VARCHAR /* e.g. 'Carroll', 'Doyle' */, date_of_birth TIMESTAMP, date_joined_staff TIMESTAMP, date_left_staff TIMESTAMP);\nCREATE TABLE Vehicles (vehicle_id BIGINT, vehicle_details VARCHAR /* e.g. 'Car', 'Truck' */);", "question": "What is the id and detail of the vehicle used in lessons for most of the times?", "sql": "SELECT T1.vehicle_id, T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id, T1.vehicle_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06715", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty do we have?", "sql": "SELECT COUNT(*) FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06716", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the total number of faculty members?", "sql": "SELECT COUNT(*) FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06717", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What ranks do we have for faculty?", "sql": "SELECT DISTINCT rank FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06718", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the list of distinct ranks for faculty.", "sql": "SELECT DISTINCT rank FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06719", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the distinct buildings that have faculty rooms.", "sql": "SELECT DISTINCT building FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06720", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What buildings have faculty offices?", "sql": "SELECT DISTINCT building FROM Faculty;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06721", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the rank, first name, and last name for all the faculty.", "sql": "SELECT rank, Fname, Lname FROM Faculty;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06722", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the rank, first name, and last name of the faculty members?", "sql": "SELECT rank, Fname, Lname FROM Faculty;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06723", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the first name, last name, and phone number for all female faculty members.", "sql": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06724", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name, last name, and phone number of all the female faculty members?", "sql": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06725", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show ids for all the male faculty.", "sql": "SELECT FacID FROM Faculty WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06726", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the faculty ids of all the male faculty members?", "sql": "SELECT FacID FROM Faculty WHERE Sex = 'M';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06727", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many female Professors do we have?", "sql": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06728", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of female Professors we have.", "sql": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06729", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the phone, room, and building for the faculty named Jerry Prince.", "sql": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06730", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the phone, room, and building of the faculty member called Jerry Prince?", "sql": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06731", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many Professors are in building NEB?", "sql": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06732", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Count the number of Professors who have office in building NEB.", "sql": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06733", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the first name and last name for all the instructors.", "sql": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06734", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name and last name of all the instructors?", "sql": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06735", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the buildings along with the number of faculty members the buildings have.", "sql": "SELECT building, COUNT(*) FROM Faculty GROUP BY building;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06736", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty members does each building have? List the result with the name of the building.", "sql": "SELECT building, COUNT(*) FROM Faculty GROUP BY building;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06737", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which building has most faculty members?", "sql": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06739", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the buildings that have at least 10 professors.", "sql": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06740", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "In which buildings are there at least ten professors?", "sql": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06741", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "For each faculty rank, show the number of faculty members who have it.", "sql": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06742", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty members do we have for each faculty rank?", "sql": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06743", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the ranks and the number of male and female faculty for each rank.", "sql": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06744", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty members do we have for each rank and gender?", "sql": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06747", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the number of male and female assistant professors.", "sql": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06748", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many male and female assistant professors do we have?", "sql": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06749", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first name and last name of Linda Smith's advisor?", "sql": "SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = 'Linda' AND T2.lname = 'Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06750", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Who is the advisor of Linda Smith? Give me the first name and last name.", "sql": "SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = 'Linda' AND T2.lname = 'Smith';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06751", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids of students whose advisors are professors.", "sql": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06752", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which students have professors as their advisors? Find their student ids.", "sql": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06753", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show first name and last name for all the students advised by Michael Goodrich.", "sql": "SELECT T2.fname, T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = 'Michael' AND T1.lname = 'Goodrich';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06754", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which students are advised by Michael Goodrich? Give me their first and last names.", "sql": "SELECT T2.fname, T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = 'Michael' AND T1.lname = 'Goodrich';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06755", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the faculty id of each faculty member, along with the number of students he or she advises.", "sql": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06756", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the faculty id and the number of students each faculty has?", "sql": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06757", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the faculty ranks and the number of students advised by each rank.", "sql": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06758", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many students are advised by each rank of faculty? List the rank and the number of students.", "sql": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06759", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first and last name of the faculty who has the most students?", "sql": "SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID, T1.fname, T1.lname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06760", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give me the the first and last name of the faculty who advises the most students.", "sql": "SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID, T1.fname, T1.lname ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06761", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids for all the faculty members who have at least 2 students.", "sql": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06762", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which faculty members advise two ore more students? Give me their faculty ids.", "sql": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06763", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show ids for the faculty members who don't advise any student.", "sql": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06764", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the ids of the faculty members who do not advise any student.", "sql": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06765", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What activities do we have?", "sql": "SELECT activity_name FROM Activity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06766", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "List all the activities we have.", "sql": "SELECT activity_name FROM Activity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06767", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many activities do we have?", "sql": "SELECT COUNT(*) FROM Activity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06768", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of activities available.", "sql": "SELECT COUNT(*) FROM Activity;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06769", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty members participate in an activity?", "sql": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06770", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Give me the number of faculty members who participate in an activity", "sql": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06771", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids of the faculty who don't participate in any activity.", "sql": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06772", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which faculty do not participate in any activity? Find their faculty ids.", "sql": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06773", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids of all the faculty members who participate in an activity and advise a student.", "sql": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06774", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are ids of the faculty members who not only participate in an activity but also advise a student.", "sql": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06775", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many activities does Mark Giuliano participate in?", "sql": "SELECT COUNT(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = 'Mark' AND T1.lname = 'Giuliano';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06776", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the number of activities Mark Giuliano is involved in.", "sql": "SELECT COUNT(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = 'Mark' AND T1.lname = 'Giuliano';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06777", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the names of all the activities Mark Giuliano participates in.", "sql": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = 'Mark' AND T1.lname = 'Giuliano';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06778", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the names of the activities Mark Giuliano is involved in", "sql": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = 'Mark' AND T1.lname = 'Giuliano';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06779", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.", "sql": "SELECT T1.fname, T1.lname, COUNT(*), T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID, T1.fname, T1.lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06780", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", "sql": "SELECT T1.fname, T1.lname, COUNT(*), T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID, T1.fname, T1.lname;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06781", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show all the activity names and the number of faculty involved in each activity.", "sql": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06782", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", "sql": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06785", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the activity that has the most faculty members involved in?", "sql": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06786", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which activity has the most faculty members participating in? Find the activity name.", "sql": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06787", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids of the students who don't participate in any activity.", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06788", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the ids of the students who are not involved in any activity", "sql": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06789", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Show the ids for all the students who participate in an activity and are under 20.", "sql": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06790", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", "sql": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06793", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What is the name of the activity with the most students?", "sql": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06794", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the name of the activity that has the largest number of student participants.", "sql": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID, T1.activity_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06795", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", "sql": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06796", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", "sql": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06797", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names of professors who are not playing Canoeing or Kayaking.", "sql": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06798", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", "sql": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06799", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", "sql": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06800", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "What are the first names of the faculty members playing both Canoeing and Kayaking?", "sql": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06801", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Find the ids of the students who participate in Canoeing and Kayaking.", "sql": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06802", "db_id": "activity_1", "schema_text": "CREATE TABLE Activity (actid BIGINT, activity_name VARCHAR /* e.g. 'Accordion Ensemble', 'Baseball' */);\nCREATE TABLE Faculty (FacID BIGINT, Lname VARCHAR, Fname VARCHAR, Rank VARCHAR /* e.g. 'Professor', 'AsstProf' */, Sex VARCHAR /* e.g. 'M', 'F' */, Phone BIGINT, Room VARCHAR /* e.g. '119', '288' */, Building VARCHAR /* e.g. 'Barton', 'Krieger' */);\nCREATE TABLE Faculty_Participates_in (FacID BIGINT, actid BIGINT);\nCREATE TABLE Participates_in (stuid BIGINT, actid BIGINT);\nCREATE TABLE Student (StuID BIGINT, LName VARCHAR, Fname VARCHAR, Age BIGINT, Sex VARCHAR /* e.g. 'M', 'F' */, Major BIGINT, Advisor BIGINT, city_code VARCHAR /* e.g. 'BAL', 'PIT' */);", "question": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", "sql": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06803", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name of the airport in the city of Goroka.", "sql": "SELECT name FROM airports WHERE city = 'Goroka';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06804", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the names of the airports in the city of Goroka?", "sql": "SELECT name FROM airports WHERE city = 'Goroka';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06805", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.", "sql": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06806", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name, city, country, and elevation for every airport in the city of New York?", "sql": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06807", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many airlines are there?", "sql": "SELECT COUNT(*) FROM airlines;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06808", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the total number of airlines?", "sql": "SELECT COUNT(*) FROM airlines;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06809", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many airlines does Russia has?", "sql": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06810", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of airlines based in Russia?", "sql": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06811", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the maximum elevation of all airports in the country of Iceland?", "sql": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06812", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the highest elevation of an airport in the country of Iceland?", "sql": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06813", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name of the airports located in Cuba or Argentina.", "sql": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06814", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the names of all airports in Cuba or Argentina?", "sql": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06815", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the country of the airlines whose name starts with 'Orbit'.", "sql": "SELECT country FROM airlines WHERE name ILIKE 'Orbit%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06816", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the countries of all airlines whose names start with Orbit?", "sql": "SELECT country FROM airlines WHERE name ILIKE 'Orbit%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06817", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name of airports whose altitude is between -50 and 50.", "sql": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06818", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the names of all airports whose elevation is between -50 and 50?", "sql": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06819", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Which country is the airport that has the highest altitude located in?", "sql": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06820", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the country of the airport with the highest elevation?", "sql": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06821", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of airports whose name contain the word 'International'.", "sql": "SELECT COUNT(*) FROM airports WHERE name ILIKE '%International%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06822", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many airports' names have the word Interanation in them?", "sql": "SELECT COUNT(*) FROM airports WHERE name ILIKE '%International%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06823", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many different cities do have some airport in the country of Greenland?", "sql": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06824", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "In how many cities are there airports in the country of Greenland?", "sql": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06825", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes operated by American Airlines.", "sql": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06826", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many routes does American Airlines operate?", "sql": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06827", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes whose destination airports are in Canada.", "sql": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06828", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many routes end in a Canadian airport?", "sql": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06829", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name, city, and country of the airport that has the lowest altitude.", "sql": "SELECT name, city, country FROM airports ORDER BY elevation LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06830", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name, city, and country of the airport with the lowest altitude?", "sql": "SELECT name, city, country FROM airports ORDER BY elevation LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06831", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name, city, and country of the airport that has the highest latitude.", "sql": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06832", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name, city, and country of the airport with the highest elevation?", "sql": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06833", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name and city of the airport which is the destination of the most number of routes.", "sql": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid, T1.name, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06834", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name and city of the airport that the most routes end at?", "sql": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid, T1.name, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06835", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the names of the top 10 airlines that operate the most number of routes.", "sql": "SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid, T1.name ORDER BY COUNT(*) DESC LIMIT 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06836", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "For the airline ids with the top 10 most routes operated, what are their names?", "sql": "SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid, T1.name ORDER BY COUNT(*) DESC LIMIT 10;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06837", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name and city of the airport which is the source for the most number of flight routes.", "sql": "SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid, T1.name, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06838", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name and city of the airport from most of the routes start?", "sql": "SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid, T1.name, T1.city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06839", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of different airports which are the destinations of the American Airlines.", "sql": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06840", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of different different airports that are destinations for American Airlines?", "sql": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06841", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Which countries has the most number of airlines?", "sql": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06842", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name of the country with the most number of home airlines?", "sql": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06843", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Which countries has the most number of airlines whose active status is 'Y'?", "sql": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06844", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the countries with the most airlines whose active status is Y?", "sql": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06851", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Return the cities with more than 3 airports in the United States.", "sql": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06852", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of cities in the United States with more than 3 airports?", "sql": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06853", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many cities are there that have more than 3 airports?", "sql": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3);", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06854", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the count of cities with more than 3 airports?", "sql": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3);", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06855", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "List the cities which have more than one airport and number of airports.", "sql": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06856", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the names of all cities with more than one airport and how many airports do they have?", "sql": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06859", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes for each source airport and the airport name.", "sql": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06860", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "For each airport name, how many routes start at that airport?", "sql": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06863", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the average elevation of all airports for each country.", "sql": "SELECT AVG(elevation), country FROM airports GROUP BY country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06864", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "For each country, what is the average elevation of that country's airports?", "sql": "SELECT AVG(elevation), country FROM airports GROUP BY country;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06865", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the cities which have exactly two airports.", "sql": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06866", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What are the cities with exactly two airports?", "sql": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06867", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "For each country and airline name, how many routes are there?", "sql": "SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06868", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the total number of routes for each country and airline in that country?", "sql": "SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06869", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes with destination airports in Italy.", "sql": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06870", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of routes whose destinations are Italian airports?", "sql": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06871", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.", "sql": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06872", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?", "sql": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06873", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes that have destination John F Kennedy International Airport.", "sql": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06874", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the number of routes that end at John F Kennedy International Airport?", "sql": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06875", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the number of routes from the United States to Canada.", "sql": "SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06876", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "How many routes go from the United States to Canada?", "sql": "SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06877", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the id of routes whose source and destination airports are in the United States.", "sql": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06878", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the id of the routes whose source and destination airports are in the United States?", "sql": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States');", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06879", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the name of airline which runs the most number of routes.", "sql": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06880", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name of the airline with the most routes?", "sql": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06881", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the busiest source airport that runs most number of routes in China.", "sql": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06882", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name of the airport with the most number of routes that start in China?", "sql": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06883", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "Find the busiest destination airport that runs most number of routes in China.", "sql": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06884", "db_id": "flight_4", "schema_text": "CREATE TABLE airlines (alid BIGINT, name VARCHAR, iata VARCHAR, icao VARCHAR, callsign VARCHAR, country VARCHAR, active VARCHAR /* e.g. 'N', 'Y' */);\nCREATE TABLE airports (apid BIGINT, name VARCHAR, city VARCHAR, country VARCHAR, x DOUBLE, y DOUBLE, elevation BIGINT, iata VARCHAR, icao VARCHAR);\nCREATE TABLE routes (rid BIGINT, dst_apid BIGINT, dst_ap VARCHAR, src_apid BIGINT, src_ap VARCHAR, alid BIGINT, airline VARCHAR, codeshare VARCHAR /* e.g. 'Y' */);", "question": "What is the name of the airport that is the destination of the most number of routes that start in China?", "sql": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06885", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What is the id of the most recent order?", "sql": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06886", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the id of the order made most recently.", "sql": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06887", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "what are the order id and customer id of the oldest order?", "sql": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06888", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the order id and customer id associated with the oldest order.", "sql": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed LIMIT 1;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06889", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the id of the order whose shipment tracking number is \"3452\".", "sql": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06890", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", "sql": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06891", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the ids of all the order items whose product id is 11.", "sql": "SELECT order_item_id FROM order_items WHERE product_id = 11;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06892", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find all the order items whose product id is 11. What are the order item ids?", "sql": "SELECT order_item_id FROM order_items WHERE product_id = 11;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06893", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the name of all the distinct customers who have orders with status \"Packing\".", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Packing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06894", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers have orders with status \"Packing\"? Give me the customer names.", "sql": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Packing';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06895", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the details of all the distinct customers who have orders with status \"On Road\".", "sql": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06896", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?", "sql": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06901", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Give me a list of id and status of orders which belong to the customer named \"Jeramie\".", "sql": "SELECT T2.order_id, T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = 'Jeramie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06902", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.", "sql": "SELECT T2.order_id, T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = 'Jeramie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06903", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the dates of orders which belong to the customer named \"Jeramie\".", "sql": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = 'Jeramie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06904", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the dates of the orders made by the customer named \"Jeramie\"?", "sql": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = 'Jeramie';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06905", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= '2009-01-01' AND T2.date_order_placed <= '2010-01-01';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06906", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= '2009-01-01' AND T2.date_order_placed <= '2010-01-01';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06907", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?", "sql": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= '1975-01-01' AND T1.date_order_placed <= '1976-01-01';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06908", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??", "sql": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= '1975-01-01' AND T1.date_order_placed <= '1976-01-01';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06909", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\".", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Shipped';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06910", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Shipped';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06911", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\".", "sql": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road' INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Shipped';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06912", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.", "sql": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'On Road' INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = 'Shipped';", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06913", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "When was the order placed whose shipment tracking number is 3452? Give me the date.", "sql": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06914", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "On which day was the order placed whose shipment tracking number is 3452?", "sql": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06915", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What is the placement date of the order whose invoice number is 10?", "sql": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06916", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "On what day was the order with invoice number 10 placed?", "sql": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06917", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the count and id of each product in all the orders.", "sql": "SELECT COUNT(*), T3.product_id FROM orders AS T1 JOIN order_items AS T2 ON TRUE JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06918", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "For each product, return its id and the number of times it was ordered.", "sql": "SELECT COUNT(*), T3.product_id FROM orders AS T1 JOIN order_items AS T2 ON TRUE JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06919", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the name and count of each product in all orders.", "sql": "SELECT T3.product_name, COUNT(*) FROM orders AS T1 JOIN order_items AS T2 ON TRUE JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id, T3.product_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06920", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "For each product, show its name and the number of times it was ordered.", "sql": "SELECT T3.product_name, COUNT(*) FROM orders AS T1 JOIN order_items AS T2 ON TRUE JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id, T3.product_name;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06921", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the ids of orders which are shipped after 2000-01-01.", "sql": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06922", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which orders have shipment after 2000-01-01? Give me the order ids.", "sql": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06923", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the id of the order which is shipped most recently.", "sql": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06924", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which order has the most recent shipment? Give me the order id.", "sql": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments);", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06925", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the names of all distinct products in alphabetical order.", "sql": "SELECT DISTINCT product_name FROM products ORDER BY product_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06926", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Sort all the distinct products in alphabetical order.", "sql": "SELECT DISTINCT product_name FROM products ORDER BY product_name;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06927", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the ids of all distinct orders ordered by placed date.", "sql": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06928", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are ids of the all distinct orders, sorted by placement date?", "sql": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06933", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", "sql": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06934", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", "sql": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06935", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.", "sql": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06936", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", "sql": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06937", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "For each customer who has at least two orders, find the customer name and number of orders made.", "sql": "SELECT T2.customer_name, COUNT(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T2.customer_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06938", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers have made at least two orders? Give me each customer name and number of orders made.", "sql": "SELECT T2.customer_name, COUNT(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T2.customer_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06939", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Find the name of the customers who have at most two orders.", "sql": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T2.customer_name HAVING COUNT(*) <= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06940", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the names of the customers who have made two or less orders?", "sql": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id, T2.customer_name HAVING COUNT(*) <= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06941", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the names of the customers who have once bought product \"food\".", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON TRUE JOIN order_items AS T3 ON TRUE JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = 'food' GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06942", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "What are the names of the customers who bought product \"food\" at least once?", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON TRUE JOIN order_items AS T3 ON TRUE JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = 'food' GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06943", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON TRUE JOIN order_items AS T3 ON TRUE JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = 'Cancel' AND T4.product_name = 'food' GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06944", "db_id": "tracking_orders", "schema_text": "CREATE TABLE Customers (customer_id BIGINT, customer_name VARCHAR /* e.g. 'Alberto', 'Beulah' */, customer_details VARCHAR /* e.g. 'rerum', 'commodi' */);\nCREATE TABLE Invoices (invoice_number BIGINT, invoice_date TIMESTAMP, invoice_details VARCHAR /* e.g. 'voluptatem', 'doloremque' */);\nCREATE TABLE Order_Items (order_item_id BIGINT, product_id BIGINT, order_id BIGINT, order_item_status VARCHAR /* e.g. 'Payed', 'Cancel' */, order_item_details VARCHAR);\nCREATE TABLE Orders (order_id BIGINT, customer_id BIGINT, order_status VARCHAR /* e.g. 'On Road', 'Packing' */, date_order_placed TIMESTAMP, order_details VARCHAR);\nCREATE TABLE Products (product_id BIGINT, product_name VARCHAR /* e.g. 'phone', 'book' */, product_details VARCHAR);\nCREATE TABLE Shipment_Items (shipment_id BIGINT, order_item_id BIGINT);\nCREATE TABLE Shipments (shipment_id BIGINT, order_id BIGINT, invoice_number BIGINT, shipment_tracking_number VARCHAR /* e.g. '0114', '0182' */, shipment_date TIMESTAMP, other_shipment_details VARCHAR);", "question": "Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", "sql": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON TRUE JOIN order_items AS T3 ON TRUE JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = 'Cancel' AND T4.product_name = 'food' GROUP BY T1.customer_id, T1.customer_name HAVING COUNT(*) >= 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06945", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "How many architects are female?", "sql": "SELECT COUNT(*) FROM architect WHERE gender = 'female';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06946", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "List the name, nationality and id of all male architects ordered by their names lexicographically.", "sql": "SELECT name, nationality, id FROM architect WHERE gender = 'male' ORDER BY name;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06948", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What is the average length in feet of the bridges?", "sql": "SELECT AVG(length_feet) FROM bridge;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06949", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the names and year of construction for the mills of 'Grondzeiler' type?", "sql": "SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06950", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the distinct names and nationalities of the architects who have ever built a mill?", "sql": "SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06951", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the names of the mills which are not located in 'Donceel'?", "sql": "SELECT name FROM mill WHERE LOCATION <> 'Donceel';", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06952", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the distinct types of mills that are built by American or Canadian architects?", "sql": "SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06953", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the ids and names of the architects who built at least 3 bridges ?", "sql": "SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id, T1.name HAVING COUNT(*) >= 3;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06954", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What is the id, name and nationality of the architect who built most mills?", "sql": "SELECT T1.id, T1.name, T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id, T1.name, T1.nationality ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06955", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the ids, names and genders of the architects who built two bridges or one mill?", "sql": "SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id, T1.name, T1.gender HAVING COUNT(*) = 2 UNION SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id, T1.name, T1.gender HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06956", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", "sql": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06957", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "Which of the mill names contains the french word 'Moulin'?", "sql": "SELECT name FROM mill WHERE name ILIKE '%Moulin%';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06958", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?", "sql": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06959", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "What is the most common mill type, and how many are there?", "sql": "SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06960", "db_id": "architecture", "schema_text": "CREATE TABLE architect (id BIGINT, name VARCHAR /* e.g. 'Frank Gehry', 'Frank Lloyd Wright' */, nationality VARCHAR /* e.g. 'American', 'Canadian' */, gender VARCHAR /* e.g. 'male', 'female' */);\nCREATE TABLE bridge (architect_id BIGINT, id BIGINT, name VARCHAR /* e.g. 'Aloba Arch', 'Gaotun Natural Bridge' */, location VARCHAR /* e.g. 'Guangxi , China', 'Arches National Park , Utah , USA' */, length_meters DOUBLE, length_feet DOUBLE);\nCREATE TABLE mill (architect_id BIGINT, id BIGINT, location VARCHAR /* e.g. 'Coswarem', 'Donceel' */, name VARCHAR /* e.g. 'Le Vieux Molen', 'Moulin Bertrand' */, type VARCHAR /* e.g. 'Grondzeiler', 'Bergmolen' */, built_year BIGINT, notes VARCHAR /* e.g. 'Molenechos (Dutch)' */);", "question": "How many architects haven't built a mill before year 1850?", "sql": "SELECT COUNT(*) FROM architect WHERE id NOT IN (SELECT architect_id FROM mill WHERE built_year < 1850);", "source": "spider", "difficulty": "extra"} -{"id": "spider_train_06962", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "How many book clubs are there?", "sql": "SELECT COUNT(*) FROM book_club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06963", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Count the number of book clubs.", "sql": "SELECT COUNT(*) FROM book_club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06964", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "show the titles, and authors or editors for all books made after the year 1989.", "sql": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06965", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are the titles and authors or editors that correspond to books made after 1989?", "sql": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06966", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all distinct publishers for books.", "sql": "SELECT DISTINCT publisher FROM book_club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06967", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are all the different book publishers?", "sql": "SELECT DISTINCT publisher FROM book_club;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06968", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show the years, book titles, and publishers for all books, in descending order by year.", "sql": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06969", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are the years, titles, and publishers for all books, ordered by year descending?", "sql": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06970", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all publishers and the number of books for each publisher.", "sql": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06971", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "How many books are there for each publisher?", "sql": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06972", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What is the publisher with most number of books?", "sql": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06973", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Return the publisher that has published the most books.", "sql": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06974", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all book categories and the number of books in each category.", "sql": "SELECT category, COUNT(*) FROM book_club GROUP BY category;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06975", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "How many books fall into each category?", "sql": "SELECT category, COUNT(*) FROM book_club GROUP BY category;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06976", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "List categories that have at least two books after year 1989.", "sql": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06977", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What categories have two or more corresponding books that were made after 1989?", "sql": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06978", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show publishers with a book published in 1989 and a book in 1990.", "sql": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06979", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are the publishers who have published a book in both 1989 and 1990?", "sql": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06980", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all publishers which do not have a book in 1989.", "sql": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06981", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Which publishers did not publish a book in 1989?", "sql": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06982", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all movie titles, years, and directors, ordered by budget.", "sql": "SELECT title, YEAR, director FROM movie ORDER BY budget_million;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06983", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are the titles, years, and directors of all movies, ordered by budget in millions?", "sql": "SELECT title, YEAR, director FROM movie ORDER BY budget_million;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06984", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "How many movie directors are there?", "sql": "SELECT COUNT(DISTINCT director) FROM movie;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06985", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Count the number of different directors.", "sql": "SELECT COUNT(DISTINCT director) FROM movie;", "source": "spider", "difficulty": "easy"} -{"id": "spider_train_06986", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?", "sql": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06987", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.", "sql": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06988", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all director names who have a movie in both year 1999 and 2000.", "sql": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06989", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Which directors had a movie both in the year 1999 and 2000?", "sql": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999;", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06990", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all director names who have a movie in the year 1999 or 2000.", "sql": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06991", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Which directors had a movie in either 1999 or 2000?", "sql": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06992", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What is the average, maximum, and minimum budget for all movies before 2000.", "sql": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06993", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", "sql": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06994", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "List all company names with a book published by Alyson.", "sql": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06995", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are all the company names that have a book published by Alyson?", "sql": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson';", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06996", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show the movie titles and book titles for all companies in China.", "sql": "SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06997", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are the titles of movies and books corresponding to companies incorporated in China?", "sql": "SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China';", "source": "spider", "difficulty": "hard"} -{"id": "spider_train_06998", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "Show all company names with a movie directed in year 1999.", "sql": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_06999", "db_id": "culture_company", "schema_text": "CREATE TABLE book_club (book_club_id BIGINT, Year BIGINT, Author_or_Editor VARCHAR /* e.g. 'Antoinette Azolakov', 'Claire McNab' */, Book_Title VARCHAR /* e.g. 'Death Takes the Stage', 'Goldenboy' */, Publisher VARCHAR /* e.g. 'Alyson', 'Banned Books' */, Category VARCHAR /* e.g. 'Gay M/SF', 'Lesb. M/SF' */, Result VARCHAR /* e.g. 'Nom', 'Won' */);\nCREATE TABLE culture_company (Company_name VARCHAR /* e.g. 'Cathay Pacific Culture', 'Culture China' */, Type VARCHAR /* e.g. 'Subsidiary', 'Joint Venture' */, Incorporated_in VARCHAR /* e.g. 'Hong Kong', 'China' */, Group_Equity_Shareholding DOUBLE, book_club_id BIGINT, movie_id BIGINT);\nCREATE TABLE movie (movie_id BIGINT, Title VARCHAR /* e.g. '3000 Miles to Graceland', 'Agent Red' */, Year BIGINT, Director VARCHAR /* e.g. 'Anthony Hickox', 'Christian Duguay' */, Budget_million DOUBLE, Gross_worldwide BIGINT);", "question": "What are all company names that have a corresponding movie directed in the year 1999?", "sql": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999;", "source": "spider", "difficulty": "medium"} -{"id": "spider_train_07000", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest city in wyoming", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07001", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what wyoming city has the largest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07002", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in wyoming", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07003", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the most populated area of wyoming", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07004", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which city in wyoming has the largest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07005", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what cities in wyoming have the highest number of citizens", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07006", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what cities in wyoming have the highest populations", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07007", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populous city in wyoming", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07008", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in wyoming by population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07009", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city of wyoming", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07010", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the city in wyoming with the largest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'wyoming') AND state_name = 'wyoming';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07011", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers run through the state with the largest city in the us", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07012", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how big is new mexico", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07013", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of new mexico", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07014", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how large is new mexico", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07015", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the new mexico state", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07016", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the size of new mexico", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07017", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of new mexico in square kilometers", "sql": "SELECT area FROM state WHERE state_name = 'new mexico';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07018", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07019", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people reside in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07020", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many residents live in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07021", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how much population does california have", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07022", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the population of california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07023", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07024", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people are in the state of california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07025", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what can you tell me about the population of california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07026", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people are there in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07027", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many citizens in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07028", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people stay in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07029", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many citizens live in california", "sql": "SELECT population FROM state WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07030", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the smallest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MIN(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07031", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the least populous state", "sql": "SELECT state_name FROM state WHERE population = (SELECT MIN(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07032", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the lowest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MIN(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07033", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the cities in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07034", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "tell me what cities are in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07035", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what cities are located in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07036", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the cities in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07037", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what cities in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07038", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the cities which are in texas", "sql": "SELECT city_name FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07039", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the state with the capital albany", "sql": "SELECT area FROM state WHERE capital = 'albany';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07040", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the lakes in california", "sql": "SELECT lake_name FROM lake WHERE state_name = 'california';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07041", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the major lakes in michigan", "sql": "SELECT lake_name FROM lake WHERE area > 750 AND state_name = 'michigan';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07042", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the states", "sql": "SELECT state_name FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07043", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "list the states", "sql": "SELECT state_name FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07044", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me all the states of usa", "sql": "SELECT state_name FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07045", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states do ohio river flow through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07046", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states does the ohio river run through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07047", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border the ohio river", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07048", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border the ohio river", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07049", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states does the ohio run through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07050", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the ohio river", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07051", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does the ohio river run through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07052", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does the ohio run through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07053", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does the ohio river pass through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07054", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the states that the ohio run through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07055", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the ohio river", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07056", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have rivers named ohio", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07057", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "through which states does the ohio flow", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07058", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states are next to the ohio", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07059", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "through which states does the ohio run", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07060", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states does the ohio river go through", "sql": "SELECT traverse FROM river WHERE river_name = 'ohio';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07061", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07062", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populous state", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07063", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state is the largest in population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07064", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the biggest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07065", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the greatest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07066", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the most population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07067", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the most people", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07068", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the most people", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07069", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populous state in the us", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07070", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the highest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07071", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest elevation in pennsylvania", "sql": "SELECT lowest_elevation FROM highlow WHERE state_name = 'pennsylvania';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07072", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in each state whose lowest point is sea level", "sql": "SELECT highest_point, state_name FROM highlow WHERE lowest_elevation = 0;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07073", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the length of the longest river in the usa", "sql": "SELECT LENGTH FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07074", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the longest river in the usa", "sql": "SELECT LENGTH FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07075", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river flowing through texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07076", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest river in texas state", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07077", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07078", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest river in texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07079", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river that flows through texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07080", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the biggest rivers in texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07081", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are in idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07082", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the number of rivers in idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07083", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers does idaho have", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07084", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are there in idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07085", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers run through idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07086", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are found in idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07087", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers in idaho", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse = 'idaho';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07088", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states neighbor kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07089", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07090", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07091", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the states that border kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07092", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state borders kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07093", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states are next to kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07094", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states surround kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07095", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state borders kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07096", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the neighboring states for kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07097", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states adjoin kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07098", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "states bordering kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07099", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state border kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07100", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the adjacent state of kentucky", "sql": "SELECT border FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07101", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name all the rivers in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07102", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "rivers in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07103", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are all the rivers in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07104", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the rivers in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07105", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers are in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07106", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers are there in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07107", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers run through illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07108", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers flow through illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07109", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river flows through illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07110", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the rivers in the state of illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07111", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the rivers in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07112", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the rivers of illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07113", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers are in illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07114", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers flow through illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07115", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the river that cross over illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07116", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river runs through illinois", "sql": "SELECT river_name FROM river WHERE traverse = 'illinois';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07117", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state is springfield in", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07118", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07119", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "springfield is in what state", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07120", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have cities named springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07121", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states have cities named springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07122", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state is springfield in", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07123", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have a city named springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07124", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the city springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07125", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have towns named springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07126", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state is springfield located in", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07127", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "in which state is springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07128", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state is the city springfield located in", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07129", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states in the united states have a city of springfield", "sql": "SELECT state_name FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07130", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the state with the largest area", "sql": "SELECT population FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07131", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the largest state", "sql": "SELECT population FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07132", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07133", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07134", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people lived in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07135", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "number of people in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07136", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of boulder city", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07137", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how big is the city of boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07138", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "population of boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07139", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07140", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "people in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07141", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07142", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many inhabitants does boulder have", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07143", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "number of citizens in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07144", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many citizens in boulder", "sql": "SELECT population FROM city WHERE city_name = 'boulder';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07145", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest city in alaska", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city WHERE state_name = 'alaska') AND state_name = 'alaska';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07146", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states lie on the largest river in the united states", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07147", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does the longest river run through", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07148", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the longest river", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07149", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the states through which the longest river runs", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07150", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does the longest river cross", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07151", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density of the state with the smallest area", "sql": "SELECT density FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07152", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density of the smallest state", "sql": "SELECT density FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07153", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states have points higher than the highest point in colorado", "sql": "SELECT state_name FROM highlow WHERE highest_elevation > (SELECT highest_elevation FROM highlow WHERE state_name = 'colorado');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07154", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states have points that are higher than the highest point in colorado", "sql": "SELECT state_name FROM highlow WHERE highest_elevation > (SELECT highest_elevation FROM highlow WHERE state_name = 'colorado');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07155", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states high point are higher than that of colorado", "sql": "SELECT state_name FROM highlow WHERE highest_elevation > (SELECT highest_elevation FROM highlow WHERE state_name = 'colorado');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07156", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest elevation in delaware", "sql": "SELECT highest_elevation FROM highlow WHERE state_name = 'delaware';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07157", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high is the highest point of delaware", "sql": "SELECT highest_elevation FROM highlow WHERE state_name = 'delaware';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07158", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how tall is the highest point in delaware", "sql": "SELECT highest_elevation FROM highlow WHERE state_name = 'delaware';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07159", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in delaware in meters", "sql": "SELECT highest_elevation FROM highlow WHERE state_name = 'delaware';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07160", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high is the highest point in delaware", "sql": "SELECT highest_elevation FROM highlow WHERE state_name = 'delaware';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07161", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the longest river that passes through the us", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07162", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the longest river in usa", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07163", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in america", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07164", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the longest river in us", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07165", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river is the longest one in the united states", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07166", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the us", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07167", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07168", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the united states", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07169", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the city with the largest population", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07170", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest city", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07171", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the largest city", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07172", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the city with the most population", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07173", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest city in the largest state", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07174", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state is the biggest", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07175", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the largest area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07176", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07177", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest state in continental us", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07178", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "state the state with the largest area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07179", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state in usa", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07180", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest state", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07181", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest state in the usa", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07182", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the largest state", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07183", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state in the us", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07184", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07185", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the highest points of states surrounding mississippi", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07186", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the high points of states surrounding mississippi", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07187", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in states bordering colorado", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'colorado') ORDER BY highest_elevation DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07188", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the states bordering colorado", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'colorado') ORDER BY highest_elevation DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07189", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the lowest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07190", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the lowest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07191", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the lowest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07192", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the smallest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07193", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the sparsest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07194", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the sparsest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07195", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the least population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07196", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the least population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07197", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the smallest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07198", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the highest point in texas", "sql": "SELECT highest_point FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07199", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in texas", "sql": "SELECT highest_point FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07200", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the high point of texas", "sql": "SELECT highest_point FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07201", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest mountain in texas", "sql": "SELECT highest_point FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07202", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "could you tell me what is the highest point in the state of texas", "sql": "SELECT highest_point FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07203", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have no bordering state", "sql": "SELECT state_name FROM state WHERE state_name NOT IN (SELECT state_name FROM border_info);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07204", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the states which have no surrounding states", "sql": "SELECT state_name FROM state WHERE state_name NOT IN (SELECT state_name FROM border_info);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07205", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border no other states", "sql": "SELECT state_name FROM state WHERE state_name NOT IN (SELECT state_name FROM border_info);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07206", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the state with the smallest population density", "sql": "SELECT area FROM state WHERE density = (SELECT MIN(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07207", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "count the states which have elevations lower than what alabama has", "sql": "SELECT COUNT(state_name) FROM highlow WHERE lowest_elevation < (SELECT lowest_elevation FROM highlow WHERE state_name = 'alabama');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07208", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high is guadalupe peak", "sql": "SELECT highest_elevation FROM highlow WHERE highest_point = 'guadalupe peak';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07209", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how tall is guadalupe peak", "sql": "SELECT highest_elevation FROM highlow WHERE highest_point = 'guadalupe peak';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07210", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the maximum elevation of guadalupe peak", "sql": "SELECT highest_elevation FROM highlow WHERE highest_point = 'guadalupe peak';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07211", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high is the highest point in america", "sql": "SELECT MAX(highest_elevation) FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07212", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest elevation in the united states", "sql": "SELECT MAX(highest_elevation) FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07213", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the elevation of the highest point in the usa", "sql": "SELECT MAX(highest_elevation) FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07214", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the height of the highest point in the usa", "sql": "SELECT MAX(highest_elevation) FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07215", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the rio grande river", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07216", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the length of the rio grande river", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07217", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what length is the rio grande", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07218", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the rio grande", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07219", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the rio grande river in miles", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07220", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is rio grande", "sql": "SELECT LENGTH FROM river WHERE river_name = 'rio grande';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07221", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the longest river in texas", "sql": "SELECT LENGTH FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07222", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the length of the longest river that runs through texas", "sql": "SELECT LENGTH FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07223", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many capitals does rhode island have", "sql": "SELECT COUNT(capital) FROM state WHERE state_name = 'rhode island';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07224", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities are there in the united states", "sql": "SELECT COUNT(city_name) FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07225", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities does the usa have", "sql": "SELECT COUNT(city_name) FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07226", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities are there in the us", "sql": "SELECT COUNT(city_name) FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07227", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities are there in usa", "sql": "SELECT COUNT(city_name) FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07228", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities are there in us", "sql": "SELECT COUNT(city_name) FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07229", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many major cities are there", "sql": "SELECT COUNT(city_name) FROM city WHERE population > 150000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07230", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many citizens does the biggest city have in the usa", "sql": "SELECT population FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07231", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many colorado rivers are there", "sql": "SELECT COUNT(river_name) FROM river WHERE river_name = 'colorado';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07232", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are called colorado", "sql": "SELECT COUNT(river_name) FROM river WHERE river_name = 'colorado';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07233", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of seattle washington", "sql": "SELECT population FROM city WHERE city_name = 'seattle' AND state_name = 'washington';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07234", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in seattle washington", "sql": "SELECT population FROM city WHERE city_name = 'seattle' AND state_name = 'washington';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07235", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in the biggest city in alaska state", "sql": "SELECT population FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'alaska') AND state_name = 'alaska';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07236", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how large is the largest city in alaska", "sql": "SELECT population FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'alaska') AND state_name = 'alaska';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07237", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in the capital of texas", "sql": "SELECT population FROM city WHERE city_name = (SELECT capital FROM state WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07238", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the size of the capital of texas", "sql": "SELECT population FROM city WHERE city_name = (SELECT capital FROM state WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07239", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in the united states", "sql": "SELECT SUM(population) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07240", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the combined population of all 50 states", "sql": "SELECT SUM(population) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07241", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are in the usa", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07242", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are there", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07243", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are there in the usa", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07244", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states does usa have", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07245", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are in the united states", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07246", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are there in united states", "sql": "SELECT COUNT(state_name) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07247", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border kentucky", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07248", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states does kentucky border", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07249", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "kentucky borders how many states", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07250", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "number of states bordering kentucky", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07251", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the number of neighboring states for kentucky", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = 'kentucky';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07252", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border the state with the largest population", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07253", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states do not have rivers", "sql": "SELECT COUNT(DISTINCT state_name) FROM state WHERE state_name NOT IN (SELECT traverse FROM river);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07254", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have a higher point than the highest point of the state with the largest capital city in the us", "sql": "SELECT COUNT(state_name) FROM highlow WHERE highest_elevation > (SELECT highest_elevation FROM highlow WHERE state_name = (SELECT state_name FROM state WHERE capital = (SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city))));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07255", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the major rivers in illinois", "sql": "SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'illinois';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07256", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major rivers in illinois", "sql": "SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'illinois';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07257", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are major rivers in illinois", "sql": "SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'illinois';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07258", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what major rivers run through illinois", "sql": "SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'illinois';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07259", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "through which states does the longest river in texas run", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse = 'texas');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07260", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the capital city in texas", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07261", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of texas", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07262", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the texas state", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07263", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is capital of texas", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07264", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state texas", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07265", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "can you tell me the capital of texas", "sql": "SELECT capital FROM state WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07266", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the capitals of states that border texas", "sql": "SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07267", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the capital cities of the states which border texas", "sql": "SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07268", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the capitals of the states that border texas", "sql": "SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07269", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which capitals are in the states that border texas", "sql": "SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07270", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the cities in states through which the mississippi runs", "sql": "SELECT city_name FROM city WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07271", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the cities of the state with the highest point", "sql": "SELECT city_name FROM city WHERE state_name IN (SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07272", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the highest points of all the states", "sql": "SELECT highest_point FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07273", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07274", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in the state of kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07275", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what major cities are located in kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07276", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "show major cities in kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07277", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the names of the major cities in kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07278", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities of kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07279", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the major cities in kansas", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = 'kansas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07280", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in states through which the mississippi runs", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name IN (SELECT traverse FROM river WHERE LENGTH > 750 AND river_name = 'mississippi');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07281", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in the usa", "sql": "SELECT city_name FROM city WHERE population > 150000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07282", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities of the united states", "sql": "SELECT city_name FROM city WHERE population > 150000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07283", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities of the us", "sql": "SELECT city_name FROM city WHERE population > 150000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07284", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the population densities of each us state", "sql": "SELECT density FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07285", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of states through which the mississippi river run", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07286", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of states through which the mississippi runs", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07287", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of the states through which the mississippi runs", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07288", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of states through which the mississippi river runs", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07289", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of the states through which the mississippi run", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07290", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of the states through which the mississippi river run", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07291", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of states through which the mississippi run", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07292", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of the states through which the mississippi river runs", "sql": "SELECT population FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07293", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of states which border texas", "sql": "SELECT t2.population FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07294", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of the major cities of wisconsin", "sql": "SELECT population FROM city WHERE population > 150000 AND state_name = 'wisconsin';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07295", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the populations of all the major cities in wisconsin", "sql": "SELECT population FROM city WHERE population > 150000 AND state_name = 'wisconsin';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07296", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the major cities in wisconsin", "sql": "SELECT population FROM city WHERE population > 150000 AND state_name = 'wisconsin';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07297", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what city has the most people", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07298", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what city in the united states has the highest population density", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07299", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populous city", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07300", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which us city has the highest population density", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07301", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest city in the usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07302", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "whats the largest city", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07303", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what city has the largest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07304", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest city in the us", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07305", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest city in usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07306", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest capital city in the us", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07307", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest capital city in the usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07308", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state capital in population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07309", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest capital", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07310", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populated capital in the usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07311", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what capital is the largest in the us", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07312", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what capital has the largest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07313", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is largest capital", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07314", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of states that have cities named durham", "sql": "SELECT t2.capital FROM state AS t2 JOIN city AS t1 ON t2.state_name = t1.state_name WHERE t1.city_name = 'durham';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07315", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the smallest state", "sql": "SELECT capital FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07316", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the largest population density", "sql": "SELECT DISTINCT capital FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07317", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the largest population", "sql": "SELECT capital FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07318", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the most inhabitants", "sql": "SELECT capital FROM state WHERE population = (SELECT MAX(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07319", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the longest river", "sql": "SELECT capital FROM state WHERE state_name IN (SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07320", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the combined area of all 50 states", "sql": "SELECT SUM(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07321", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of all the states combined", "sql": "SELECT SUM(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07322", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many square kilometers in the us", "sql": "SELECT SUM(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07323", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the total area of the usa", "sql": "SELECT SUM(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07324", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the density of the wyoming", "sql": "SELECT density FROM state WHERE state_name = 'wyoming';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07325", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density of wyoming", "sql": "SELECT density FROM state WHERE state_name = 'wyoming';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07326", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the density of wyoming", "sql": "SELECT density FROM state WHERE state_name = 'wyoming';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07327", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest mountain in the us", "sql": "SELECT mountain_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07328", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest mountain in us", "sql": "SELECT mountain_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07329", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the tallest mountain in america", "sql": "SELECT mountain_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07330", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the tallest mountain in the united states", "sql": "SELECT mountain_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07331", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the state with capital des moines", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT state_name FROM state WHERE capital = 'des moines');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07332", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the state with the capital des moines", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT state_name FROM state WHERE capital = 'des moines');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07333", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the usa", "sql": "SELECT highest_point FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07334", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point of the usa", "sql": "SELECT highest_point FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07335", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the country", "sql": "SELECT highest_point FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07336", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the us", "sql": "SELECT highest_point FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07337", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the united states", "sql": "SELECT highest_point FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07338", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point of the state with the smallest population density", "sql": "SELECT highest_point FROM highlow WHERE state_name IN (SELECT state_name FROM state WHERE density = (SELECT MIN(density) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07339", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in smallest state through which the mississippi runs", "sql": "SELECT city_name FROM city WHERE state_name IN (SELECT state_name FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi') AND area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi'))) ORDER BY population DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07340", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in the smallest state in the usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07341", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest city in the smallest state", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07342", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state bordering california", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'california')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'california');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07343", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state that borders california", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'california')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'california');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07344", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state that borders california is the largest", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'california')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'california');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07345", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the largest state", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state))) AND traverse IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07346", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the states that border tennessee", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee')) AND traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07347", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river that flows through a state that borders tennessee", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee')) AND traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07348", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river that runs through a state that borders tennessee", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee')) AND traverse IN (SELECT border FROM border_info WHERE state_name = 'tennessee');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07349", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the state with the most major cities", "sql": "SELECT river_name FROM river WHERE traverse = (SELECT state_name FROM city WHERE population > 150000 GROUP BY state_name ORDER BY COUNT(city_name) DESC LIMIT 1) ORDER BY LENGTH DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07350", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point in iowa", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07351", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point in iowa in meters", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07352", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point in the state of iowa", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07353", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the lowest point in iowa", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07354", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point of iowa", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07355", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the lowest spot in iowa", "sql": "SELECT lowest_point FROM highlow WHERE state_name = 'iowa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07356", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point in usa", "sql": "SELECT lowest_point FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07357", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point in the united states", "sql": "SELECT lowest_point FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07358", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the lowest point in the us", "sql": "SELECT lowest_point FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07359", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point of the us", "sql": "SELECT lowest_point FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07360", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point of all states through which the mississippi river runs through", "sql": "SELECT lowest_point FROM highlow WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi') ORDER BY lowest_elevation LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07361", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the lowest point of the states that the mississippi runs through", "sql": "SELECT lowest_point FROM highlow WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi') ORDER BY lowest_elevation LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07362", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most dense state in the usa", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07363", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the highest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07364", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the greatest density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07365", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the highest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07366", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the greatest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07367", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07368", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the largest density in usa", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07369", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the largest population density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07370", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the largest density", "sql": "SELECT state_name FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07371", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populous state through which the mississippi runs", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi')) AND state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07372", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state which the mississippi runs through has the largest population", "sql": "SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi')) AND state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07373", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density of the largest state", "sql": "SELECT density FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07374", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the largest city in the state with the largest area", "sql": "SELECT population FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07375", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the smallest state", "sql": "SELECT population FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07376", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the state with the highest population density", "sql": "SELECT population FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07377", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in the state with the largest population density", "sql": "SELECT population FROM state WHERE density = (SELECT MAX(density) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07378", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest city in the usa", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07379", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest city in the us", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07380", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what city has the least population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07381", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the city with the smallest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07382", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state bordering texas", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07383", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state that borders texas", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07384", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the smallest area that borders texas", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07385", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state that the mississippi river runs through", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi')) AND state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07386", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the smallest area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07387", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the smallest state", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07388", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state is the smallest", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07389", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state in the usa", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07390", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state by area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07391", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the smallest area", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07392", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the total length of all rivers in the usa", "sql": "SELECT SUM(LENGTH) FROM river;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07393", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river flows through the most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07394", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which river goes through the most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07395", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which river runs through most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07396", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which river traverses most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07397", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river traverses the most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07398", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which river runs through the most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07399", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what river runs through the most states", "sql": "SELECT river_name FROM river GROUP BY (river_name), river_name ORDER BY COUNT(DISTINCT traverse) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07400", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers are in states that border alabama", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'alabama');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07401", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers run through states bordering alabama", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'alabama');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07402", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers flow through states that alabama borders", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'alabama');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07403", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state bordering oklahoma has the largest population", "sql": "SELECT state_name FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'oklahoma') ORDER BY population DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07404", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which of the states bordering oklahoma has the largest population", "sql": "SELECT state_name FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'oklahoma') ORDER BY population DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07405", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state that borders oklahoma has the highest population", "sql": "SELECT state_name FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'oklahoma') ORDER BY population DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07406", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the most populated state bordering oklahoma", "sql": "SELECT state_name FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'oklahoma') ORDER BY population DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07407", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state contains the highest point of those the colorado river traverses", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'colorado'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07408", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest capital", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07409", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state 's capital city is the largest", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07410", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the longest river", "sql": "SELECT DISTINCT traverse FROM river WHERE LENGTH = (SELECT MAX(DISTINCT LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07411", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the smallest urban population", "sql": "SELECT state_name FROM city GROUP BY state_name ORDER BY SUM(population) LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07412", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states that border colorado", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'colorado');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07413", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states that the mississippi runs through", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07414", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border states through which the mississippi traverses", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07415", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states which the mississippi runs through", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07416", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border texas and have a major river", "sql": "SELECT state_name FROM border_info WHERE border = 'texas' AND state_name IN (SELECT traverse FROM river WHERE LENGTH > 750);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07417", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border the most populous state", "sql": "SELECT border FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07418", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the states that border the state with the greatest population", "sql": "SELECT border FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07419", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border the state with the smallest area", "sql": "SELECT border FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07420", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border the state with the smallest area", "sql": "SELECT border FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07421", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states contain at least one major rivers", "sql": "SELECT traverse FROM river WHERE LENGTH > 750;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07422", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where are mountains", "sql": "SELECT state_name FROM mountain;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07423", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the highest mountain of the united states", "sql": "SELECT state_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07424", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the highest peak in the country", "sql": "SELECT state_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07425", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is the smallest city", "sql": "SELECT state_name FROM city WHERE population = (SELECT MIN(population) FROM city);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07426", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the density of the state that the largest river in the united states runs through", "sql": "SELECT density FROM state WHERE state_name IN (SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07427", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the highest peak not in alaska", "sql": "SELECT mountain_name FROM mountain WHERE mountain_altitude = (SELECT MAX(mountain_altitude) FROM mountain WHERE state_name <> 'alaska');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07428", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers do not run through tennessee", "sql": "SELECT river_name FROM river WHERE river_name NOT IN (SELECT river_name FROM river WHERE traverse = 'tennessee');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07429", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers do not run through tennessee", "sql": "SELECT river_name FROM river WHERE river_name NOT IN (SELECT river_name FROM river WHERE traverse = 'tennessee');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07430", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers do not run through usa", "sql": "SELECT river_name FROM river WHERE country_name <> 'usa';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07431", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers run through states that border the state with the capital atlanta", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name IN (SELECT state_name FROM state WHERE capital = 'atlanta'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07432", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers run through the states that border the state with the capital atlanta", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name IN (SELECT state_name FROM state WHERE capital = 'atlanta'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07433", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state capital has the smallest population", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(t1.population) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07434", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the highest elevation", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07435", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the highest point", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07436", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the highest elevation", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07437", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "in which state does the highest point in usa exist", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07438", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has highest elevation", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07439", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the highest elevation in the united states", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07440", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state that contains the highest point", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07441", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state contains the highest point in the us", "sql": "SELECT state_name FROM highlow WHERE highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07442", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the lowest elevation", "sql": "SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07443", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the name of the state with the lowest point", "sql": "SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07444", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the state with the lowest point", "sql": "SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07445", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the lowest point that borders idaho", "sql": "SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'idaho')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'idaho');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07446", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state has the smallest average urban population", "sql": "SELECT state_name FROM city GROUP BY state_name ORDER BY AVG(population) LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07447", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state is mount whitney in", "sql": "SELECT state_name FROM mountain WHERE mountain_name = 'whitney';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07448", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "in what state is mount whitney", "sql": "SELECT state_name FROM mountain WHERE mountain_name = 'whitney';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07449", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is mount whitney", "sql": "SELECT state_name FROM mountain WHERE mountain_name = 'whitney';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07450", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is mount whitney located", "sql": "SELECT state_name FROM mountain WHERE mountain_name = 'whitney';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07451", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states have a river", "sql": "SELECT traverse FROM river;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07452", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have rivers running through them", "sql": "SELECT traverse FROM river;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07453", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states have a major city named austin", "sql": "SELECT state_name FROM city WHERE city_name = 'austin' AND population > 150000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07454", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in a state that borders california", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'california')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'california');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07455", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest city in states that border california", "sql": "SELECT city_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'california')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'california');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07456", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers do not traverse the state with the capital albany", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse NOT IN (SELECT state_name FROM state WHERE capital = 'albany');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07457", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the shortest river in texas", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river WHERE traverse = 'texas') AND traverse = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07458", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in the smallest state in the us", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07459", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the capital of the largest state through which the mississippi runs", "sql": "SELECT population FROM city WHERE city_name = (SELECT capital FROM state WHERE area = (SELECT MAX(t1.area) FROM state AS t1 JOIN river AS t2 ON t1.state_name = t2.traverse WHERE t2.river_name = 'mississippi'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07460", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the shortest river in the usa", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07461", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the shortest river", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07462", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the shortest river in the us", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07463", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the shortest river in the united states", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07464", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which is the shortest river", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07465", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state that borders the state that borders texas", "sql": "SELECT capital FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07466", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest city of the smallest state in the us", "sql": "SELECT city_name FROM city WHERE population = (SELECT MIN(population) FROM city WHERE state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state))) AND state_name IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07467", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the largest state that borders texas", "sql": "SELECT population FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07468", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state is salem the capital of", "sql": "SELECT state_name FROM state WHERE capital = 'salem';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07469", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states capital is salem", "sql": "SELECT state_name FROM state WHERE capital = 'salem';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07470", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "salem is the capital of which state", "sql": "SELECT state_name FROM state WHERE capital = 'salem';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07471", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the capital salem", "sql": "SELECT state_name FROM state WHERE capital = 'salem';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07472", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers flow through the state with the largest population", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07473", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state that borders the state with the highest population", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT state_name FROM border_info WHERE border IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state)))) AND state_name IN (SELECT state_name FROM border_info WHERE border IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state)));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07474", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are there in us", "sql": "SELECT COUNT(river_name) FROM river;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07475", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name the 50 capitals in the usa", "sql": "SELECT DISTINCT capital FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07476", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have a city named springfield", "sql": "SELECT COUNT(state_name) FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07477", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have a city called springfield", "sql": "SELECT COUNT(state_name) FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07478", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have cities named springfield", "sql": "SELECT COUNT(state_name) FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07479", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have cities or towns named springfield", "sql": "SELECT COUNT(state_name) FROM city WHERE city_name = 'springfield';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07480", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state borders the state with the smallest population", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT state_name FROM state WHERE population = (SELECT MIN(population) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07481", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the lakes in states bordering texas", "sql": "SELECT lake_name FROM lake WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07482", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many major cities are in texas", "sql": "SELECT COUNT(city_name) FROM city WHERE population > 150000 AND state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07483", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many big cities are in texas", "sql": "SELECT COUNT(city_name) FROM city WHERE population > 150000 AND state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07484", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many major cities are there in texas", "sql": "SELECT COUNT(city_name) FROM city WHERE population > 150000 AND state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07485", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high are the highest points of all the states", "sql": "SELECT highest_elevation FROM highlow;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07486", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states does the missouri run through", "sql": "SELECT COUNT(traverse) FROM river WHERE river_name = 'missouri';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07487", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states does the missouri river flow through", "sql": "SELECT COUNT(traverse) FROM river WHERE river_name = 'missouri';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07488", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states does the missouri river run through", "sql": "SELECT COUNT(traverse) FROM river WHERE river_name = 'missouri';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07489", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the smallest state in the usa", "sql": "SELECT river_name FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river WHERE traverse IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state))) AND traverse IN (SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07490", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the average population per square km in pennsylvania", "sql": "SELECT population / area FROM state WHERE state_name = 'pennsylvania';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07491", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states that border states that border florida", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT border FROM border_info WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'florida'));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07492", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border at least one other state", "sql": "SELECT COUNT(DISTINCT state_name) FROM border_info;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07493", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the height of the highest mountain in texas", "sql": "SELECT MAX(DISTINCT highest_elevation) FROM highlow WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07494", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border colorado and border new mexico", "sql": "SELECT COUNT(border) FROM border_info WHERE border IN (SELECT border FROM border_info WHERE state_name = 'new mexico') AND state_name = 'colorado';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07495", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many major cities are in states bordering nebraska", "sql": "SELECT COUNT(city_name) FROM city WHERE population > 150000 AND state_name IN (SELECT border FROM border_info WHERE state_name = 'nebraska');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07496", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the total population of the states that border texas", "sql": "SELECT SUM(t2.population) FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07497", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major lakes in united states", "sql": "SELECT lake_name FROM lake WHERE area > 750;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07498", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "show me all the major lakes in the us", "sql": "SELECT lake_name FROM lake WHERE area > 750;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07499", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "name all the lakes of us", "sql": "SELECT lake_name FROM lake;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07500", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many major rivers cross ohio", "sql": "SELECT COUNT(river_name) FROM river WHERE LENGTH > 750 AND traverse = 'ohio';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07501", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the shortest river", "sql": "SELECT DISTINCT traverse FROM river WHERE LENGTH = (SELECT MIN(DISTINCT LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07502", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states are next to major rivers", "sql": "SELECT COUNT(DISTINCT traverse) FROM river WHERE LENGTH > 750;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07503", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the height of mount mckinley", "sql": "SELECT mountain_altitude FROM mountain WHERE mountain_name = 'mckinley';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07504", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states does the shortest river run through", "sql": "SELECT traverse FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07505", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the state with the smallest population", "sql": "SELECT t2.highest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN (SELECT state_name FROM state WHERE population = (SELECT MIN(population) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07506", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which rivers run through the state with the lowest elevation in the usa", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07507", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers run through the state with the lowest point in the usa", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT state_name FROM highlow WHERE lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07508", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what mountains are in alaska", "sql": "SELECT mountain_name FROM mountain WHERE state_name = 'alaska';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07509", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states have major rivers", "sql": "SELECT COUNT(traverse) FROM river WHERE LENGTH > 750;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07510", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the smallest state through which the longest river runs", "sql": "SELECT state_name FROM state WHERE area = (SELECT MIN(area) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river))) AND state_name IN (SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07511", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state traversed by the rio grande river", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'rio grande')) AND state_name IN (SELECT traverse FROM river WHERE river_name = 'rio grande');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07512", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest of the state that the rio grande runs through", "sql": "SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'rio grande')) AND state_name IN (SELECT traverse FROM river WHERE river_name = 'rio grande');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07513", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers run through the states bordering colorado", "sql": "SELECT COUNT(river_name) FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name = 'colorado');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07514", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has no rivers", "sql": "SELECT state_name FROM state WHERE state_name NOT IN (SELECT traverse FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07515", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the largest state", "sql": "SELECT capital FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07516", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital city of the largest state in the us", "sql": "SELECT capital FROM state WHERE area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07517", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities are in texas", "sql": "SELECT COUNT(city_name) FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07518", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities does texas have", "sql": "SELECT COUNT(city_name) FROM city WHERE state_name = 'texas';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07519", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the states", "sql": "SELECT area FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07520", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states in the us does the shortest river run through", "sql": "SELECT COUNT(DISTINCT traverse) FROM river WHERE LENGTH = (SELECT MIN(DISTINCT LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07521", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers flow through states that border the state with the largest population", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT border FROM border_info WHERE state_name IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state)));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07522", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in the largest state", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name = (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07523", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the smallest state", "sql": "SELECT area FROM state WHERE area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07524", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states border the longest river in the usa", "sql": "SELECT border FROM border_info WHERE state_name IN (SELECT traverse FROM river WHERE LENGTH = (SELECT MAX(LENGTH) FROM river));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07525", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density of the state with the smallest population", "sql": "SELECT density FROM state WHERE population = (SELECT MIN(population) FROM state);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07526", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border the mississippi river", "sql": "SELECT COUNT(DISTINCT border) FROM border_info WHERE state_name IN (SELECT traverse FROM river WHERE river_name = 'mississippi');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07527", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states have a capital that is the highest point in the state", "sql": "SELECT t1.state_name FROM state AS t1 JOIN highlow AS t2 ON t1.capital = t2.highest_point;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07528", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the capital of the smallest state", "sql": "SELECT population FROM city WHERE city_name = (SELECT capital FROM state WHERE area = (SELECT MIN(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07529", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population of the capital of the largest state", "sql": "SELECT population FROM city WHERE city_name = (SELECT capital FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07530", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the lowest point of the state with the largest area", "sql": "SELECT t2.lowest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07531", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states that border the state with the largest population", "sql": "SELECT t1.border FROM border_info AS t2 JOIN border_info AS t1 ON t2.border = t1.state_name WHERE t2.state_name IN (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07532", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the size of the largest state in the usa", "sql": "SELECT MAX(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07533", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the area of the largest state", "sql": "SELECT MAX(area) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07534", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which capitals are not major cities", "sql": "SELECT t2.capital FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name WHERE t1.population <= 150000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07535", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "give me the cities in usa", "sql": "SELECT city_name FROM city;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07536", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point of the state with the largest area", "sql": "SELECT t2.highest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07537", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "where is massachusetts", "sql": "SELECT country_name FROM state WHERE state_name = 'massachusetts';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07538", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what state has the largest urban population", "sql": "SELECT state_name FROM city GROUP BY state_name ORDER BY SUM(population) DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07539", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major rivers in the us", "sql": "SELECT river_name FROM river;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07540", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many cities named austin are there in the usa", "sql": "SELECT COUNT(city_name) FROM city WHERE city_name = 'austin';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07541", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many people live in the smallest state bordering wyoming", "sql": "SELECT population FROM state WHERE population = (SELECT MAX(population) FROM state WHERE state_name IN (SELECT border FROM border_info WHERE state_name = 'wyoming')) AND state_name IN (SELECT border FROM border_info WHERE state_name = 'wyoming');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07542", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the length of the colorado river in texas", "sql": "SELECT LENGTH FROM river WHERE river_name = 'colorado' AND traverse = 'texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07543", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the population density in the state with capital austin", "sql": "SELECT density FROM state WHERE capital = 'austin';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07544", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how long is the shortest river in the usa", "sql": "SELECT LENGTH FROM river WHERE LENGTH = (SELECT MIN(LENGTH) FROM river);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07545", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the elevation of death valley", "sql": "SELECT lowest_elevation FROM highlow WHERE lowest_point = 'death valley';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07546", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the average population of the us by state", "sql": "SELECT AVG(population) FROM state;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07547", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what rivers flow through the largest state", "sql": "SELECT river_name FROM river WHERE traverse IN (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07548", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what states border states that border states that border states that border texas", "sql": "SELECT t1.border FROM border_info AS t2 JOIN border_info AS t1 ON t2.border = t1.state_name JOIN border_info AS t3 ON t3.border = t2.state_name JOIN border_info AS t4 ON t4.border = t3.state_name WHERE t4.state_name = 'texas';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07549", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border on the state whose capital is boston", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE capital = 'boston');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07550", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what are the major cities in the states through which the major river in virginia runs", "sql": "SELECT city_name FROM city WHERE population > 150000 AND state_name IN (SELECT traverse FROM river WHERE river_name IN (SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'virginia'));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07551", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which states does not border texas", "sql": "SELECT state_name FROM state WHERE state_name NOT IN (SELECT border FROM border_info WHERE state_name = 'texas');", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07552", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many states border the largest state", "sql": "SELECT COUNT(border) FROM border_info WHERE state_name = (SELECT state_name FROM state WHERE area = (SELECT MAX(area) FROM state));", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07553", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "which state is the largest city in montana in", "sql": "SELECT state_name FROM city WHERE population = (SELECT MAX(population) FROM city WHERE state_name = 'montana') AND state_name = 'montana';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07554", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is capital of the state with the lowest point", "sql": "SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07555", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the biggest american city in a state with a river", "sql": "SELECT DISTINCT t1.city_name FROM city AS t1 JOIN river AS t2 ON t2.traverse = t1.state_name WHERE t1.population = (SELECT MAX(t1.population) FROM river AS t2 JOIN city AS t1 ON t2.traverse = t1.state_name);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07556", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are in the state with the largest population", "sql": "SELECT COUNT(t2.river_name) FROM river AS t2 JOIN state AS t1 ON t1.state_name = t2.traverse WHERE t1.state_name = (SELECT state_name FROM state WHERE population = (SELECT MAX(population) FROM state));", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07557", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the largest state that borders the state with the lowest point in the usa", "sql": "SELECT t1.state_name FROM highlow AS t3 JOIN border_info AS t1 ON t3.state_name = t1.border JOIN state AS t2 ON t2.state_name = t1.border WHERE t3.lowest_elevation = (SELECT MIN(lowest_elevation) FROM highlow) ORDER BY t2.area DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07558", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the highest point", "sql": "SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07559", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the capital of the state with the highest elevation", "sql": "SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07560", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the highest point in the smallest state", "sql": "SELECT t2.highest_point FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t1.area = (SELECT MIN(area) FROM state);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07561", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how many rivers are in the state with the highest point.", "sql": "SELECT COUNT(t1.river_name) FROM highlow AS t2 JOIN river AS t1 ON t1.traverse = t2.state_name WHERE t2.highest_elevation = (SELECT MAX(highest_elevation) FROM highlow);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07562", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "how high is the highest point in the largest state", "sql": "SELECT t2.highest_elevation FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t1.area = (SELECT MAX(area) FROM state);", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07563", "db_id": "geo", "schema_text": "CREATE TABLE border_info (state_name VARCHAR, border VARCHAR);\nCREATE TABLE city (city_name VARCHAR, population BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE highlow (state_name VARCHAR, highest_elevation VARCHAR, lowest_point VARCHAR, highest_point VARCHAR, lowest_elevation VARCHAR);\nCREATE TABLE lake (lake_name VARCHAR, area DOUBLE, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE mountain (mountain_name VARCHAR, mountain_altitude BIGINT, country_name VARCHAR, state_name VARCHAR);\nCREATE TABLE river (river_name VARCHAR, length BIGINT, country_name VARCHAR, traverse VARCHAR);\nCREATE TABLE state (state_name VARCHAR, population BIGINT, area DOUBLE, country_name VARCHAR, capital VARCHAR, density DOUBLE);", "question": "what is the longest river in the state with the highest point", "sql": "SELECT t1.river_name FROM highlow AS t2 JOIN river AS t1 ON t1.traverse = t2.state_name WHERE t2.highest_elevation = (SELECT MAX(highest_elevation) FROM highlow) ORDER BY t1.length DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07564", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that are coauthored by Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07565", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers written by Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07566", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are the papers that have Peter Mertens and Dina Barbian as co-authors", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07567", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers have Peter Mertens and Dina Barbian written ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07568", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what paper did Peter Mertens and Dina Barbian write together ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07569", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Has Peter Mertens and Dina Barbian written a paper together ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07570", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers by Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07571", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by authors Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07572", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were written by authors Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07574", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers written by authors Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07575", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When did Peter Mertens and Dina Barbian collaborate ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07576", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are the collaborations of Peter Mertens and Dina Barbian ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07577", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Have Peter Mertens and Dina Barbian written a paper together ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07578", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Peter Mertens and Dina Barbian as co-authors", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07579", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Does Peter Mertens ever collaborated with Dina Barbian ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07580", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which papers have Peter Mertens and Dina Barbian as co-authors ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07581", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers coauthored by Peter Mertens and Dina Barbian", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07582", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers have been written by Peter Mertens and Dina Barbian ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07583", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers have been written by both Peter Mertens and Dina Barbian ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Peter Mertens' AND t1.authorname = 'Dina Barbian';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07585", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has written the most syntactic parsing papers ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07586", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who is the most published author in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07587", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has the most publications in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07588", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has written the most papers on syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07589", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List prominent scholars in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07590", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who wrote the most papers on syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07591", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who are the authors with the most published papers in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07592", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "top syntactic parsing author", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07593", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "top author in syntactic parsing", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07594", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published the most in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07595", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published the most papers in syntactic parsing ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07596", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many citation noah a smith has ?", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07597", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "noah a smith citation count", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07598", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many citations does noah a smith have ?", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07600", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of citations of noah a smith", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07602", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many times was noah a smith cited ?", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07603", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many citations does noah a smith has ?", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'noah a smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07604", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "chi papers", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07605", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers at chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07606", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers in chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07607", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07608", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers about chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07609", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Show me chi papers .", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07610", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers did chi publish ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07611", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "list papers published in chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07612", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers on chi", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'chi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07613", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Has mirella lapata written any papers in 2016 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t2.authorid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'mirella lapata' AND t3.year = 2016 GROUP BY t2.authorid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07614", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has sharon goldwater written ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07615", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has written by sharon goldwater ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07616", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by sharon goldwater", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07617", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what did sharon goldwater write ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07618", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers where sharon goldwater is an author", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07619", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers authored by sharon goldwater", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07620", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "sharon goldwater papers", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07622", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers written by sharon goldwater", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07623", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which papers has sharon goldwater written ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07625", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What has sharon goldwater published ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07626", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Does sharon goldwater have any papers published ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07627", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "sharon goldwater 's papers", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07628", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "show me papers by sharon goldwater .", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07629", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers are authored by sharon goldwater ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'sharon goldwater';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07631", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What was oren etzioni 's latest paper ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07632", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Latest paper by oren etzioni", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07633", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the latest paper by oren etzioni ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07634", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is oren etzioni 's latest paper ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07635", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the latest papers by oren etzioni ?", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07636", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most recent papers by oren etzioni", "sql": "SELECT DISTINCT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'oren etzioni' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07637", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "are there any monte carlo simulation papers since 2011 ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'monte carlo simulation' AND t3.year > 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07638", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "monte carlo simulation papers later than 2011", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'monte carlo simulation' AND t3.year > 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07639", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "monte carlo simulation later than 2011", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'monte carlo simulation' AND t3.year > 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07640", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "monte carlo simulation papers published after 2011", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'monte carlo simulation' AND t3.year > 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07641", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "monte carlo simulation papers since 2011", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'monte carlo simulation' AND t3.year > 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07642", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "does ras bodik publish a lot ?", "sql": "SELECT COUNT(t3.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'ras bodik';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07643", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers did David M. Blei publish at AISTATS ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07644", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does David M. Blei have in AISTATS ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07645", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers has David M. Blei published in AISTATS ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07646", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers does David M. Blei have at AISTATS", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07648", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many David M. Blei papers are in AISTATS ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07649", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers David M. Blei has in AISTATS ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'David M. Blei' AND t4.venuename = 'AISTATS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07651", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List all academic papers on machine networks for one shot learning", "sql": "SELECT DISTINCT paperid FROM paper WHERE title = 'machine networks for one shot learning';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07652", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "machine networks for one shot learning", "sql": "SELECT DISTINCT paperid FROM paper WHERE title = 'machine networks for one shot learning';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07653", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which EMNLP 2010 papers have the most citations ?", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citedpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2010 AND t2.venuename = 'EMNLP' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07654", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which paper from EMNLP 2010 was cited most ?", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citedpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2010 AND t2.venuename = 'EMNLP' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07655", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most cited EMNLP 2010 papers", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citedpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2010 AND t2.venuename = 'EMNLP' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07656", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which EMNLP 2010 papers have been cited the most ?", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citedpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2010 AND t2.venuename = 'EMNLP' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07657", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were published at CVPR in 2016 about Class consistent multi-modal fusion with binary features applied to RGB-D Object Dataset ?", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'RGB-D Object Dataset' AND t3.title = 'Class consistent multi-modal fusion with binary features' AND t3.year = 2016 AND t4.venuename = 'CVPR';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07658", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were published at CVPR '16 about Class consistent multi-modal fusion with binary features applied to RGB-D Object Dataset ?", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'RGB-D Object Dataset' AND t3.title = 'Class consistent multi-modal fusion with binary features' AND t3.year = 2016 AND t4.venuename = 'CVPR';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07659", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers are in deep learning ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07660", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers are about deep learning ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07661", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers about deep learning ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07662", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers are related to deep learning ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07663", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers has Christopher D. Manning written ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07664", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does Christopher D. Manning have ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07665", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers has Christopher D. Manning ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07666", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers has Christopher D. Manning published ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07668", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Has Christopher D. Manning published any papers ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07671", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many paper does Christopher D. Manning have ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07672", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many publications does Christopher D. Manning have ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07674", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of papers written by Christopher D. Manning", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Christopher D. Manning';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07675", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what kind of papers does Luke Zettlemoyer publish", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07676", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Keyphrases used by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07677", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What keywords are in papers by Luke Zettlemoyer ?", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07678", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keywords used by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07679", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what keywords are used by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07681", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keyphrases by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07682", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "give me the keywords used by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07683", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What topic does Luke Zettlemoyer write about ?", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07684", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what topics does Luke Zettlemoyer publish in", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07685", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keywords in the papers written by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07687", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "topics used by Luke Zettlemoyer", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Luke Zettlemoyer';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07688", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What conference does Daniella Coelho publish in ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07689", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "conferences that Daniella Coelho has published in", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07690", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "In which conferences does Daniella Coelho typically publish ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07691", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "in what conferences does Daniella Coelho publish ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07692", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What conferences does Daniella Coelho publish in ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07693", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "At which conferences does Daniella Coelho publish ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07694", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What conferences does Daniella Coelho submit to ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Daniella Coelho';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07695", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers are there ?", "sql": "SELECT DISTINCT COUNT(DISTINCT paperid) FROM paper;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07696", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers by Ed Desmond contain the keyphrases Semantic Parsing ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t1 JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t1.paperid JOIN author AS t2 ON t3.authorid = t2.authorid WHERE t2.authorname = 'Ed Desmond' AND t4.keyphrasename = 'Semantic Parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07697", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does Ed Desmond have in Semantic Parsing area ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t1 JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t1.paperid JOIN author AS t2 ON t3.authorid = t2.authorid WHERE t2.authorname = 'Ed Desmond' AND t4.keyphrasename = 'Semantic Parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07698", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many Semantic Parsing papers has Ed Desmond written ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t1 JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t1.paperid JOIN author AS t2 ON t3.authorid = t2.authorid WHERE t2.authorname = 'Ed Desmond' AND t4.keyphrasename = 'Semantic Parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07699", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many paper has Ed Desmond written about Semantic Parsing ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperkeyphrase AS t1 JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t1.paperid JOIN author AS t2 ON t3.authorid = t2.authorid WHERE t2.authorname = 'Ed Desmond' AND t4.keyphrasename = 'Semantic Parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07700", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What conferences did li dong submit to in 2016 ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'li dong' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07701", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Where did li dong publish in 2016", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'li dong' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07702", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What conferences did li dong publish in in 2016 ?", "sql": "SELECT DISTINCT t3.venueid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'li dong' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07704", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "acl papers in 2012 on Parsing", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07705", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were published in acl in 2012 about Parsing ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07706", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers on Parsing appeared at acl last year", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07707", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Parsing papers from acl 2012", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07708", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about Parsing in acl 2012", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07709", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "acl papers in 2012 in Parsing", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07710", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "acl papers in 2012 about Parsing", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07711", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were published at acl in 2012 were about Parsing ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07712", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers on Parsing appeared at acl in 2012", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07713", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many Parsing papers did acl 2012 have ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07714", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published Parsing papers at acl 2012", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07715", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which papers in acl 2012 had Parsing in them ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07716", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what were some Parsing based papers in acl 2012 ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Parsing' AND t3.year = 2012 AND t4.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07717", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List the popular publications on dependent types", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'dependent types';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07718", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which paper should I read about dependent types ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'dependent types';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07719", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "top dependent types papers", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'dependent types';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07720", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List papers that has a keyword Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07721", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Question Answering research papers", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07722", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers on Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07723", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers related to Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07724", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07726", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers published in the area of Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07727", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Question Answering experiments", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07728", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Show me the papers on Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07729", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that used Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07730", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that mention Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07731", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Question Answering papers", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07732", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Show me Question Answering papers .", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07733", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Question Answering publications", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07734", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Fetch me some papers on Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07735", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers on Question Answering experiments", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07736", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers talk about Question Answering ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07737", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the paper about Question Answering ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07738", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which papers are about about Question Answering ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07739", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "list papers that used Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07740", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers for Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07741", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List papers that has keyword Question Answering", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07742", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers with Question Answering in keyphrases", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Question Answering';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07743", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keyphrases used by Luke S Zettlemoyer for each year", "sql": "SELECT DISTINCT t2.keyphraseid, t3.year FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Luke S Zettlemoyer' ORDER BY t3.year, t2.keyphraseid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07744", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "recent research interests of sanjeev arora", "sql": "SELECT DISTINCT t1.keyphrasename, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'sanjeev arora' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07745", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "recent papers by sanjeev arora", "sql": "SELECT DISTINCT t1.keyphrasename, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'sanjeev arora' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07746", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "recent papers written by sanjeev arora", "sql": "SELECT DISTINCT t1.keyphrasename, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'sanjeev arora' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07747", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "list papers published by balakrishnan prabhakaran", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'balakrishnan prabhakaran';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07748", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "citation count of zachary tatlock 's papers", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'zachary tatlock';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07749", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "subhasis chaudhuri", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'subhasis chaudhuri';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07750", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "list papers by subhasis chaudhuri", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'subhasis chaudhuri';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07751", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List of papers by subhasis chaudhuri", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'subhasis chaudhuri';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07752", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "conference papers of subhasis chaudhuri", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'subhasis chaudhuri';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07753", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many parsing papers in ACL 2014", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'parsing' AND t3.year = 2014 AND t4.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07754", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many parsing papers appeared in the proceeeding of ACL 2014 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'parsing' AND t3.year = 2014 AND t4.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07755", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many parsing papers were published at ACL 2014 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'parsing' AND t3.year = 2014 AND t4.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07756", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "brian curless convolution paper", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07757", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "convolution by brian curless", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07758", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by brian curless about convolution", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07759", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "brian curless 's paper about convolution", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07760", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the papers of brian curless in convolution ?", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07761", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers brian curless wrote about convolution", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07762", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "brian curless 's papers on convolution", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07763", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the paper about convolution from brian curless ?", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07764", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by brian curless in convolution topic", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07765", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "I want the papers on keyphrase0 by brian curless", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07766", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "convolution papers by brian curless", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07767", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has brian curless written on convolution ?", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07768", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has brian curless written about convolution ?", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07769", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "convolution paper by brian curless", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07770", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Does brian curless do convolution ?", "sql": "SELECT DISTINCT t1.authorid, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'brian curless' AND t5.keyphrasename = 'convolution';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07771", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has Liwen Xiong written in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07772", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07773", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What did Liwen Xiong published in 2015 ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07774", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers written by Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07775", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the papers of Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07776", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by Liwen Xiong from 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07777", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers published in 2015 by Liwen Xiong", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07778", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what has Liwen Xiong done in the past year", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07779", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers did Liwen Xiong publish last year ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07781", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Liwen Xiong 's papers in 2015 ?", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07783", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Liwen Xiong publication 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07784", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers authored by Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07785", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers from Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07786", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers are published by Liwen Xiong in 2015", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Liwen Xiong' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07787", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What TAIL paper published in NIPS ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07788", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List the papers on TAIL that were published in NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07789", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are the papers in NIPS about TAIL ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07790", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers about TAIL in NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07791", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers at NIPS related to TAIL", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07792", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about TAIL published at NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07793", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "TAIL papers in NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07794", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers on TAIL NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07795", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "TAIL papers used in NIPS", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'TAIL' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07796", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many co-authors has Mark Steedman had ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t1.authorid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname <> 'Mark Steedman' AND t2.paperid IN (SELECT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Mark Steedman');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07797", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keyphrases used by Christof Dallermassl in 2000", "sql": "SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Christof Dallermassl' AND t3.year = 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07799", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keyphrases Christof Dallermassl used in papers written last year", "sql": "SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Christof Dallermassl' AND t3.year = 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07800", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are keyphrases by Christof Dallermassl in 2000 ?", "sql": "SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Christof Dallermassl' AND t3.year = 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07801", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what author is most cited ?", "sql": "SELECT DISTINCT t1.authorname, COUNT(t3.citingpaperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t3 ON t2.paperid = t3.citedpaperid GROUP BY t1.authorname ORDER BY COUNT(t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07802", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "journal articles by mohammad rastegari", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'mohammad rastegari' AND t3.journalid >= 0;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07803", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Journal Papers by mohammad rastegari", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'mohammad rastegari' AND t3.journalid >= 0;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07804", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "best paper in TACL 2014 ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.citingpaperid), t1.paperid FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2014 AND t2.venuename = 'TACL' GROUP BY t1.paperid ORDER BY COUNT(DISTINCT t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07805", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What was the best paper at TACL 2014 ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.citingpaperid), t1.paperid FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2014 AND t2.venuename = 'TACL' GROUP BY t1.paperid ORDER BY COUNT(DISTINCT t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07806", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published at acl 2016 ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07807", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "acl 2016 authors", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07808", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "authors of acl 2016 papers", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07809", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List of authors acl 2016", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07810", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "author published acl 2016", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07811", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who had papers at acl 2016 ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07812", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List of authors in acl 2016", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2016 AND t3.venuename = 'acl';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07813", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were written on Multiuser Receiver in the Decision Feedback this year ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Multiuser Receiver in the Decision Feedback' AND t3.year = 2016 GROUP BY t3.paperid HAVING COUNT(DISTINCT t1.keyphrasename) > 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07814", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers run experiments on ImageNet ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname ILIKE 'ImageNet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07815", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers used ImageNet dataset ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname ILIKE 'ImageNet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07816", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers written on ImageNet ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname ILIKE 'ImageNet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07817", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers are based on ImageNet", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname ILIKE 'ImageNet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07818", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers use ImageNet ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname ILIKE 'ImageNet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07819", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers did Mirella Lapata cite ?", "sql": "SELECT DISTINCT COUNT(t3.citedpaperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t3 ON t2.paperid = t3.citingpaperid WHERE t1.authorname = 'Mirella Lapata';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07820", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers does Mirella Lapata cite", "sql": "SELECT DISTINCT COUNT(t3.citedpaperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t3 ON t2.paperid = t3.citingpaperid WHERE t1.authorname = 'Mirella Lapata';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07821", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers has Mirella Lapata cited ?", "sql": "SELECT DISTINCT COUNT(t3.citedpaperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t3 ON t2.paperid = t3.citingpaperid WHERE t1.authorname = 'Mirella Lapata';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07822", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When does Michael Stonebraker publish the first VLDB paper ?", "sql": "SELECT DISTINCT t3.year FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Michael Stonebraker' AND t4.venuename = 'VLDB' ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07823", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "semantic parsing dataset", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07824", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "data sets for semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07825", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "list datasets for semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07826", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets for semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07827", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Datasets with semantic parsing information", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07828", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets used by semantic parsing papers", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07829", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets in semantic parsing papers", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07830", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "semantic parsing datasets", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07831", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets in papers about semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07832", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets used for semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07833", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "large-scale datasets used in semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07834", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets with semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07835", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets used for evaluating semantic parsing", "sql": "SELECT DISTINCT t2.datasetid FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid WHERE t4.keyphrasename = 'semantic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07836", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "where does Peter Mertens publish ?", "sql": "SELECT DISTINCT t3.journalid, t4.venueid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Peter Mertens';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07837", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "in what venues does Peter Mertens publish ?", "sql": "SELECT DISTINCT t3.journalid, t4.venueid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Peter Mertens';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07839", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers appeared at nature communications last year", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07840", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were at nature communications 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07841", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers accepted in nature communications 2015", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07842", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were published in nature communications in 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07843", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers on nature communications in 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07844", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers in nature communications 2015", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07845", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were accepted at nature communications 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07846", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers are presented in nature communications 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07847", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers published in nature communications in 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07848", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers published in nature communications 2015 ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07849", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were published in nature communications 2015 conference ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07850", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers was published in nature communications in 2015", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'nature communications';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07851", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what was the first deep learning paper ?", "sql": "SELECT DISTINCT t2.datasetid, t4.year FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN keyphrase AS t5 ON t1.keyphraseid = t5.keyphraseid WHERE t5.keyphrasename = 'deep learning' ORDER BY t4.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07852", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what year was the first deep learning paper published ?", "sql": "SELECT DISTINCT t2.datasetid, t4.year FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paperkeyphrase AS t1 ON t1.paperid = t3.paperid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN keyphrase AS t5 ON t1.keyphraseid = t5.keyphraseid WHERE t5.keyphrasename = 'deep learning' ORDER BY t4.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07853", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets mentioned at ACL", "sql": "SELECT DISTINCT t1.datasetid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t4.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07854", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what datasets do papers at ACL use most ?", "sql": "SELECT DISTINCT t1.datasetid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t4.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07855", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "the papers on semantic parsing by li dong at acl in 2016", "sql": "SELECT DISTINCT t2.paperid FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN paper AS t2 ON t2.paperid = t5.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'li dong' AND t3.keyphrasename = 'semantic parsing' AND t2.year = 2016 AND t6.venuename = 'acl';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07856", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were written on convolutional neural networks in the past year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'convolutional neural networks' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07857", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were published on convolutional neural networks in 2016 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'convolutional neural networks' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07858", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were written on convolutional neural networks in 2016 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'convolutional neural networks' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07859", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were written on the convolutional neural networks this year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'convolutional neural networks' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07860", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers on convolutional neural networks have been published in the past year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'convolutional neural networks' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07861", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were written on question answering this year ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'question answering' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07862", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which year had the most NIPS papers ?", "sql": "SELECT DISTINCT COUNT(t1.paperid), t1.year FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'NIPS' GROUP BY t1.year ORDER BY COUNT(t1.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07863", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what year had the most NIPS papers ?", "sql": "SELECT DISTINCT COUNT(t1.paperid), t1.year FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'NIPS' GROUP BY t1.year ORDER BY COUNT(t1.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07864", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what year had the most number of NIPS papers ?", "sql": "SELECT DISTINCT COUNT(t1.paperid), t1.year FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'NIPS' GROUP BY t1.year ORDER BY COUNT(t1.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07865", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "when were most NIPS papers published ?", "sql": "SELECT DISTINCT COUNT(t1.paperid), t1.year FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'NIPS' GROUP BY t1.year ORDER BY COUNT(t1.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07866", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who writes papers with Noah A Smith ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07867", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who is a coauthor with Noah A Smith ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07868", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who are Noah A Smith 's co-authors", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07869", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who has coauthored with Noah A Smith ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07870", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "co-authors of Noah A Smith", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07871", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "author who wrote papers with Noah A Smith", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07872", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "authors who collaborated with Noah A Smith", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07873", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who does Noah A Smith author with ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07874", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who are Noah A Smith 's coauthors", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07875", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who are all the co-authors of Noah A Smith ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07876", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who does Noah A Smith work with ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07877", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who does Noah A Smith collaborate with ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07879", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "coauthors of Noah A Smith", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Noah A Smith';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07880", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what datasets did jitendra malik use ?", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07881", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what datasets are used in papers by jitendra malik", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07882", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what datasets did jitendra malik use in his papers ?", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07883", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what datasets were used by jitendra malik ?", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07884", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "datasets used in papers written by jitendra malik ?", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07885", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Datasets by jitendra malik", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07886", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What datasets have jitendra malik used", "sql": "SELECT DISTINCT t2.datasetid FROM paper AS t3 JOIN paperdataset AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'jitendra malik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07887", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "recent deep learning papers", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07888", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "new deep learning papers", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07889", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the latest publications on deep learning ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07890", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Most recent deep learning conference ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07891", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Show me some recent papers on deep learning ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07892", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are some recent papers written in deep learning ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07893", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the most recent paper of deep learning ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07894", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are recent papers on deep learning ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07895", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Current research on deep learning", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07896", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "latest deep learning papers", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07897", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "newest deep learning papers", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07898", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What years did Pedro Domingos publish papers in ?", "sql": "SELECT DISTINCT t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Pedro Domingos' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07899", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "In what years did Pedro Domingos publish a paper ?", "sql": "SELECT DISTINCT t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Pedro Domingos' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07900", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "jamie callan 's publications by year", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'jamie callan' ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07901", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does jamie callan publish each year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'jamie callan' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07902", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of papers by year from jamie callan", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'jamie callan' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07903", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers jamie callan published each year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'jamie callan' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07904", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who does oren etzioni cite", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'oren etzioni';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07905", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers does oren etzioni cite", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'oren etzioni';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07906", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers citing Daniel Jurafsky", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Daniel Jurafsky';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07907", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers cite Daniel Jurafsky ?", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Daniel Jurafsky';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07908", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which papers cite Daniel Jurafsky ?", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Daniel Jurafsky';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07909", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "citations for Daniel Jurafsky", "sql": "SELECT DISTINCT t3.paperid FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citingpaperid JOIN writes AS t2 ON t2.paperid = t4.citedpaperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Daniel Jurafsky';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07910", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "journal papers for instance segmentation", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'instance segmentation' AND t3.journalid >= 0;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07911", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has the most papers in semantic parsing after 2005 ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'semantic parsing' AND t4.year > 2005 GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07912", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has written the most papers on semantic parsing since 2005 ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'semantic parsing' AND t4.year > 2005 GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07913", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published the most in semantic parsing after 2005 ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'semantic parsing' AND t4.year > 2005 GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07914", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many citations does Dan Makumbi 's Genetic Identity paper have ?", "sql": "SELECT DISTINCT COUNT(t5.citingpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t3 ON t2.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN cite AS t5 ON t4.paperid = t5.citedpaperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Dan Makumbi' AND t3.keyphrasename = 'Genetic Identity';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07915", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "character recognition papers earlier than 2010", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'character recognition' AND t3.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07916", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers before 2010 about character recognition", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'character recognition' AND t3.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07917", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "character recognition papers from before 2010", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'character recognition' AND t3.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07918", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about character recognition from before 2010", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'character recognition' AND t3.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07919", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "character recognition papers before 2010", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'character recognition' AND t3.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07920", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what topics does oren etzioni write about most ?", "sql": "SELECT DISTINCT COUNT(t2.keyphraseid), t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'oren etzioni' GROUP BY t2.keyphraseid ORDER BY COUNT(t2.keyphraseid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07921", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers related to deep learning cited the dataset ImageNet ?", "sql": "SELECT DISTINCT COUNT(t4.paperid) FROM paperdataset AS t3 JOIN dataset AS t2 ON t3.datasetid = t2.datasetid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN paperkeyphrase AS t1 ON t4.paperid = t1.paperid JOIN keyphrase AS t5 ON t1.keyphraseid = t5.keyphraseid WHERE t2.datasetname = 'ImageNet' AND t5.keyphrasename = 'deep learning';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07922", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most cited papers on parsing", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07923", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "parsing top papers", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07924", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List top papers for parsing", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07925", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "parsing papers that have the most citations", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07926", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the paper about parsing of the most citation ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07927", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Paper on parsing with most citations", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07928", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "parsing papers with most citations", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07929", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most cited parsing papers", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07930", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are the parsing papers that have the most citations ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07931", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "highly cited parsing papers", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07932", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most cited papers for parsing", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07935", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the most cited paper by ohad shamir ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07936", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the highest cited paper by ohad shamir ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07937", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the most cited paper of ohad shamir ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07938", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is ohad shamir 's highest cited paper ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07939", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What paper by ohad shamir has the most citation ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07941", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what is ohad shamir 's most cited paper ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citedpaperid) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ohad shamir' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citedpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07942", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers did michael i. jordan publish in 2016 ?", "sql": "SELECT DISTINCT COUNT(t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'michael i. jordan' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07943", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does michael i. jordan have in 2016 ?", "sql": "SELECT DISTINCT COUNT(t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'michael i. jordan' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07945", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "count of ACL papers by author", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'ACL' GROUP BY t1.authorid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07946", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many ACL papers by author", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'ACL' GROUP BY t1.authorid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07947", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of ACL papers by author", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'ACL' GROUP BY t1.authorid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07948", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who wrote the most papers for CVPR 2007", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07949", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published papers in CVPR 2007", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07950", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who wrote the most CVPR papers in 2007", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07951", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most published author at CVPR 2007", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07952", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published the most papers in CVPR 2007", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07953", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who published the most papers in 2007 at CVPR ?", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2007 AND t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07954", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers in ACL 2015 ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'ACL';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07955", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of papers published in ACL 2015", "sql": "SELECT DISTINCT COUNT(DISTINCT t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'ACL';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07956", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers from 2014", "sql": "SELECT DISTINCT paperid FROM paper WHERE YEAR = 2014;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07957", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "2014 papers", "sql": "SELECT DISTINCT paperid FROM paper WHERE YEAR = 2014;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07958", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers does Richard Ladner have in chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07959", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what paper has Richard Ladner published in chi journal ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07960", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what paper has Richard Ladner published in chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07961", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers by Richard Ladner published at chi", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07962", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Does Richard Ladner publish in chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07963", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What has Richard Ladner published at chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07964", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers has Richard Ladner written at chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07965", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which paper did Richard Ladner present at chi ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Richard Ladner' AND t4.venuename = 'chi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07966", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the paper with the most citation about Artificial Intelligence ?", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citingpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'Artificial Intelligence' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07967", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Fetch me the most cited publications for Artificial Intelligence", "sql": "SELECT DISTINCT t4.citedpaperid, COUNT(t4.citingpaperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'Artificial Intelligence' GROUP BY t4.citedpaperid ORDER BY COUNT(t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07968", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "topics at ACL 2014", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2014 AND t4.venuename = 'ACL' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07969", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most common topics at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07970", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "most popular topics at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07971", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "hot topics at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07972", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "popular topics at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07973", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which topics were most popular at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07974", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "topics popular at NIPS 2015", "sql": "SELECT DISTINCT COUNT(t3.paperid), t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t3.year = 2015 AND t4.venuename = 'NIPS' GROUP BY t1.keyphraseid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07975", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers related to deep reinforcement learning in nips ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'deep reinforcement learning' AND t4.venuename = 'nips';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07976", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers on WebKB", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07977", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which papers used WebKB ?", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07978", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about WebKB", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07979", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List the papers that used WebKB dataset", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07980", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers using WebKB", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07981", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that use WebKB", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07982", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "WebKB papers", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07983", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that used WebKB", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07984", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers that use the WebKB dataset", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'WebKB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07985", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "conferences in 2013", "sql": "SELECT DISTINCT venueid FROM paper WHERE YEAR = 2013;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_07986", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how is the most cited author in CVPR ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t4.citingpaperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid JOIN cite AS t4 ON t1.paperid = t4.citedpaperid WHERE t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07987", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who is the most cited author at CVPR ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t4.citingpaperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid JOIN cite AS t4 ON t1.paperid = t4.citedpaperid WHERE t3.venuename = 'CVPR' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07988", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are some syntactic parsing papers that chris dyer did not write ?", "sql": "SELECT DISTINCT t1.authorname, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname <> 'chris dyer' AND t5.keyphrasename = 'syntactic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07989", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "are there any syntactic parsing papers not written by chris dyer ?", "sql": "SELECT DISTINCT t1.authorname, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname <> 'chris dyer' AND t5.keyphrasename = 'syntactic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07990", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what are syntactic parsing papers not written by chris dyer", "sql": "SELECT DISTINCT t1.authorname, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname <> 'chris dyer' AND t5.keyphrasename = 'syntactic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07991", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "syntactic parsing papers not written by chris dyer", "sql": "SELECT DISTINCT t1.authorname, t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname <> 'chris dyer' AND t5.keyphrasename = 'syntactic parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07992", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers published in the last year", "sql": "SELECT DISTINCT paperid FROM paper WHERE YEAR = (SELECT MAX(YEAR) FROM paper);", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_07993", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When was benjamin mako hill 's first publication ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'benjamin mako hill' GROUP BY t3.year ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07994", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When was benjamin mako hill 's first paper written ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'benjamin mako hill' GROUP BY t3.year ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07995", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When did ameet soni publish ?", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'ameet soni' GROUP BY t3.year ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07996", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who cites Daniel A Reed the most", "sql": "SELECT DISTINCT COUNT(t4.citingpaperid), t3.authorid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t4 ON t2.paperid = t4.citedpaperid JOIN writes AS t3 ON t3.paperid = t4.citingpaperid WHERE t1.authorname = 'Daniel A Reed' GROUP BY t3.authorid ORDER BY COUNT(t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07997", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who cites Daniel A Reed most ?", "sql": "SELECT DISTINCT COUNT(t4.citingpaperid), t3.authorid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN cite AS t4 ON t2.paperid = t4.citedpaperid JOIN writes AS t3 ON t3.paperid = t4.citingpaperid WHERE t1.authorname = 'Daniel A Reed' GROUP BY t3.authorid ORDER BY COUNT(t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_07998", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers are in sigir ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigir';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_07999", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers does sigir have ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigir';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08000", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers are published in sigir ?", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigir';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08001", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "number of papers in sigir conference", "sql": "SELECT DISTINCT COUNT(t1.paperid) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigir';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08002", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers have fewer than 5 citations by ACL papers ?", "sql": "SELECT DISTINCT t3.citingpaperid FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT(DISTINCT t3.citedpaperid) < 5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08003", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "ACL papers with less than 5 citations", "sql": "SELECT DISTINCT t3.citingpaperid FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT(DISTINCT t3.citedpaperid) < 5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08004", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what ACL papers have less than 5 citations ?", "sql": "SELECT DISTINCT t3.citingpaperid FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT(DISTINCT t3.citedpaperid) < 5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08006", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the 5 most recent papers of Mirella Lapata ?", "sql": "SELECT DISTINCT t3.paperid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Mirella Lapata' ORDER BY t3.year DESC LIMIT 5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08007", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What were the papers published at pldi 2015 ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08008", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers from pldi 2015 conference", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08009", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers published at pldi 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08010", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the papers from pldi 2015 ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08011", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Papers from pldi 2015 ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08012", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which papers were accepted in pldi 2015 ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08013", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were published during the conference pldi 2015 ?", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08014", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers in pldi 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08015", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List of papers in pldi 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08016", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "pldi papers in 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08017", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers are published in pldi 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08019", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "pldi papers 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08020", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "pldi 2015 conference", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08021", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "pldi best paper award 2015", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08022", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "pldi 2015 list of papers", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = 'pldi';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08023", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List today 's journals", "sql": "SELECT DISTINCT journalid FROM paper WHERE YEAR = 2011 GROUP BY journalid;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08024", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List the journals published in March , 2011", "sql": "SELECT DISTINCT journalid FROM paper WHERE YEAR = 2011 GROUP BY journalid;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08025", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "ACL papers in 2016 with neural attention in the title", "sql": "SELECT DISTINCT t1.paperid FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.title ILIKE 'neural attention' AND t1.year = 2016 AND t2.venuename = 'ACL';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08026", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who writes a lot of papers in Machine Learning ?", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename = 'Machine Learning' GROUP BY t1.authorname ORDER BY COUNT(DISTINCT t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08027", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who wrote sensor fusion ?", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename ILIKE 'sensor fusion';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08028", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Authors of papers on sensor fusion", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename ILIKE 'sensor fusion';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08029", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "people working on sensor fusion", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename ILIKE 'sensor fusion';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08030", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who publishes in sensor fusion ?", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename ILIKE 'sensor fusion';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08031", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who publishes papers about sensor fusion", "sql": "SELECT DISTINCT t1.authorname FROM paperkeyphrase AS t2 JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t2.paperid JOIN author AS t1 ON t3.authorid = t1.authorid WHERE t4.keyphrasename ILIKE 'sensor fusion';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08032", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many papers by dan klein are cited by michael i. jordan", "sql": "SELECT DISTINCT COUNT(t5.citingpaperid) FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN cite AS t5 ON t3.paperid = t5.citedpaperid JOIN writes AS t4 ON t4.paperid = t5.citingpaperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'michael i. jordan' AND t1.authorname = 'dan klein';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08033", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many of dan klein 's papers cite michael i. jordan", "sql": "SELECT DISTINCT COUNT(t5.citingpaperid) FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN cite AS t5 ON t3.paperid = t5.citedpaperid JOIN writes AS t4 ON t4.paperid = t5.citingpaperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'michael i. jordan' AND t1.authorname = 'dan klein';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08034", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who else was on the paper with Ameet Soni and Ras Bodik ?", "sql": "SELECT DISTINCT t5.authorid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = 'Ameet Soni' AND t1.authorname = 'Ras Bodik';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08035", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "2014 papers using ImageNet", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'ImageNet' AND t3.year = 2014;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08036", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What journals are Takashi Matsumoto 's articles published in ?", "sql": "SELECT DISTINCT t3.journalid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Takashi Matsumoto' GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08037", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What journals has Takashi Matsumoto published in ?", "sql": "SELECT DISTINCT t3.journalid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Takashi Matsumoto' GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08038", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "In what scholarly journals does Takashi Matsumoto publish ?", "sql": "SELECT DISTINCT t3.journalid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Takashi Matsumoto' GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08039", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What authors wrote papers about Bacterial Wilt in 2016 ?", "sql": "SELECT DISTINCT t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid JOIN author AS t5 ON t3.authorid = t5.authorid WHERE t2.keyphrasename = 'Bacterial Wilt' AND t4.year = 2016;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08040", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who wrote on the topic of Bacterial Wilt in 2016 ?", "sql": "SELECT DISTINCT t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid JOIN author AS t5 ON t3.authorid = t5.authorid WHERE t2.keyphrasename = 'Bacterial Wilt' AND t4.year = 2016;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08041", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When did Luke S Zettlemoyer publish ?", "sql": "SELECT DISTINCT t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Luke S Zettlemoyer' ORDER BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08042", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "question answering 2016 papers", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'question answering' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08043", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What papers were written on question answering in 2016 ?", "sql": "SELECT DISTINCT t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'question answering' AND t3.year = 2016;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08044", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what keyphrases get most citations ?", "sql": "SELECT DISTINCT COUNT(t3.citingpaperid), t1.keyphrasename FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN cite AS t3 ON t2.paperid = t3.citedpaperid GROUP BY t1.keyphrasename ORDER BY COUNT(t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08045", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Find journals about Temporal Data .", "sql": "SELECT DISTINCT t3.journalid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Temporal Data' GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08046", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "List the journals related to Temporal Data", "sql": "SELECT DISTINCT t3.journalid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Temporal Data' GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08047", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which ACL 2014 papers about Parsing used Jeopardy! Questions ?", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t5 ON t3.datasetid = t5.datasetid JOIN paperkeyphrase AS t4 ON t4.paperid = t3.paperid JOIN paper AS t2 ON t2.paperid = t3.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN keyphrase AS t1 ON t4.keyphraseid = t1.keyphraseid WHERE t5.datasetname = 'Jeopardy! Questions' AND t1.keyphrasename = 'Parsing' AND t2.year = 2014 AND t6.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08048", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Parsing papers using Jeopardy! Questions published at ACL 2014", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t5 ON t3.datasetid = t5.datasetid JOIN paperkeyphrase AS t4 ON t4.paperid = t3.paperid JOIN paper AS t2 ON t2.paperid = t3.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN keyphrase AS t1 ON t4.keyphraseid = t1.keyphraseid WHERE t5.datasetname = 'Jeopardy! Questions' AND t1.keyphrasename = 'Parsing' AND t2.year = 2014 AND t6.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08049", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Parsing papers from ACL 2014 using Jeopardy! Questions", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t5 ON t3.datasetid = t5.datasetid JOIN paperkeyphrase AS t4 ON t4.paperid = t3.paperid JOIN paper AS t2 ON t2.paperid = t3.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN keyphrase AS t1 ON t4.keyphraseid = t1.keyphraseid WHERE t5.datasetname = 'Jeopardy! Questions' AND t1.keyphrasename = 'Parsing' AND t2.year = 2014 AND t6.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08050", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Parsing papers from ACL 2014 that used Jeopardy! Questions", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t5 ON t3.datasetid = t5.datasetid JOIN paperkeyphrase AS t4 ON t4.paperid = t3.paperid JOIN paper AS t2 ON t2.paperid = t3.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN keyphrase AS t1 ON t4.keyphraseid = t1.keyphraseid WHERE t5.datasetname = 'Jeopardy! Questions' AND t1.keyphrasename = 'Parsing' AND t2.year = 2014 AND t6.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08051", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers about Parsing that used Jeopardy! Questions and were published at ACL 2014", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t5 ON t3.datasetid = t5.datasetid JOIN paperkeyphrase AS t4 ON t4.paperid = t3.paperid JOIN paper AS t2 ON t2.paperid = t3.paperid JOIN venue AS t6 ON t6.venueid = t2.venueid JOIN keyphrase AS t1 ON t4.keyphraseid = t1.keyphraseid WHERE t5.datasetname = 'Jeopardy! Questions' AND t1.keyphrasename = 'Parsing' AND t2.year = 2014 AND t6.venuename = 'ACL';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08052", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "in what journals does linda shapiro publish ?", "sql": "SELECT DISTINCT t2.journalid FROM paper AS t3 JOIN journal AS t2 ON t3.journalid = t2.journalid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'linda shapiro';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08053", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which journals did linda shapiro submit papers to ?", "sql": "SELECT DISTINCT t2.journalid FROM paper AS t3 JOIN journal AS t2 ON t3.journalid = t2.journalid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'linda shapiro';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08054", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "NIPS authors", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'NIPS';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08055", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who are the authors at NIPS ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'NIPS';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08056", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who authored papers at NIPS ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'NIPS';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08057", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who publishes in NIPS ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'NIPS';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08058", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who has papers at NIPS ?", "sql": "SELECT DISTINCT t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'NIPS';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08059", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which venue publishes the most papers about deep learning", "sql": "SELECT DISTINCT COUNT(t3.paperid), t4.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'deep learning' GROUP BY t4.venueid ORDER BY COUNT(t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08060", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many publications were added to the Cell journal this year ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paper AS t3 JOIN journal AS t2 ON t3.journalid = t2.journalid JOIN paperkeyphrase AS t1 ON t3.paperid = t1.paperid WHERE t2.journalname = 'Cell' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08061", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many articles were published in the Cell journal in 2015 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paper AS t3 JOIN journal AS t2 ON t3.journalid = t2.journalid JOIN paperkeyphrase AS t1 ON t3.paperid = t1.paperid WHERE t2.journalname = 'Cell' AND t3.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08062", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are all the publication titles by Donald E Knuth ?", "sql": "SELECT DISTINCT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Donald E Knuth';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08063", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers published in eccv 2016 by ali farhadi", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ali farhadi' AND t3.year = 2016 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08064", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Does ali farhadi have a paper in eccv in 2016 ?", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ali farhadi' AND t3.year = 2016 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08065", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers of ali farhadi in eccv 2016", "sql": "SELECT DISTINCT t3.paperid FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'ali farhadi' AND t3.year = 2016 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08066", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are some papers dealing with Semantic Data in YAGO ?", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t1 ON t3.datasetid = t1.datasetid JOIN paperkeyphrase AS t2 ON t2.paperid = t3.paperid JOIN keyphrase AS t4 ON t2.keyphraseid = t4.keyphraseid WHERE t1.datasetname = 'YAGO' AND t4.keyphrasename = 'Semantic Data';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08067", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who has published more papers in chi ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'chi' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08068", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who has written the most papers at chi ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'chi' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08069", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how is the most prolific author in chi ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'chi' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08070", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who published the most at chi", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid), t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'chi' GROUP BY t1.authorid ORDER BY COUNT(DISTINCT t2.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08071", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "In what year did Ye Cao publish the most papers", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname ILIKE 'Ye Cao' GROUP BY t3.year ORDER BY COUNT(DISTINCT t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08072", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What year did Ye Cao publish the most papers", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname ILIKE 'Ye Cao' GROUP BY t3.year ORDER BY COUNT(DISTINCT t3.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08073", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "conferences that mention ImageNet", "sql": "SELECT DISTINCT t3.venueid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.datasetname = 'ImageNet';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08074", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "first deep learning paper", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' GROUP BY t3.year ORDER BY t3.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08075", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What was the first paper on deep learning written ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' GROUP BY t3.year ORDER BY t3.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08076", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When was deep learning proposed ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' GROUP BY t3.year ORDER BY t3.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08077", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "when was the first deep learning paper published ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'deep learning' GROUP BY t3.year ORDER BY t3.year ASC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08078", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers were published in Academic radiology in 1995 ?", "sql": "SELECT DISTINCT t2.paperid FROM paper AS t2 JOIN journal AS t1 ON t2.journalid = t1.journalid WHERE t1.journalname = 'Academic radiology' AND t2.year = 1995;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08079", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what papers do parsing papers typically cite ?", "sql": "SELECT DISTINCT t4.citedpaperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citingpaperid WHERE t1.keyphrasename = 'parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08080", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers typically cited by parsing papers", "sql": "SELECT DISTINCT t4.citedpaperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citingpaperid WHERE t1.keyphrasename = 'parsing';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08081", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "venue for Trophic Cascade", "sql": "SELECT DISTINCT t3.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08082", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "conferences for Trophic Cascade", "sql": "SELECT DISTINCT t3.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08083", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what conferences are related to Trophic Cascade", "sql": "SELECT DISTINCT t3.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08084", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What was the conference name that approved Trophic Cascade ?", "sql": "SELECT DISTINCT t3.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08085", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers were written on question answering in 2011 through 2016 ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'question answering' AND t3.year >= 2011;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08086", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What are the best NLP conferences ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t4.citingpaperid), t3.venueid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'NLP' GROUP BY t3.venueid ORDER BY COUNT(DISTINCT t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08087", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "ACL papers by author", "sql": "SELECT DISTINCT t2.paperid, t1.authorid FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t3.venuename = 'ACL';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08088", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers with more than 10 citations", "sql": "SELECT DISTINCT t2.citingpaperid FROM paper AS t1 JOIN cite AS t2 ON t1.paperid = t2.citedpaperid GROUP BY t2.citingpaperid HAVING COUNT(DISTINCT t2.citedpaperid) > 10;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08089", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Which authors published papers in 2015 ?", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t1 JOIN paper AS t2 ON t1.paperid = t2.paperid WHERE t2.year = 2015;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08090", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "who wrote papers in 2015", "sql": "SELECT DISTINCT t1.authorid FROM writes AS t1 JOIN paper AS t2 ON t1.paperid = t2.paperid WHERE t2.year = 2015;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08091", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what keyphrase does Brian DeRenzi write about that gets most citations ?", "sql": "SELECT DISTINCT t1.keyphrasename, SUM(t3.numcitedby) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Brian DeRenzi' GROUP BY t1.keyphrasename ORDER BY SUM(t3.numcitedby) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08092", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "main topics of work by Brian DeRenzi", "sql": "SELECT DISTINCT t1.keyphrasename, SUM(t3.numcitedby) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t5 ON t4.authorid = t5.authorid WHERE t5.authorname = 'Brian DeRenzi' GROUP BY t1.keyphrasename ORDER BY SUM(t3.numcitedby) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08093", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "authors with at least 5 papers", "sql": "SELECT DISTINCT COUNT(t2.paperid), t1.authorid FROM writes AS t1 JOIN paper AS t2 ON t1.paperid = t2.paperid GROUP BY t1.authorid HAVING COUNT(t2.paperid) >= 5;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08094", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers that were not published in the last year", "sql": "SELECT DISTINCT paperid FROM paper WHERE YEAR <> 2015;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08095", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When was Michael Stonebraker GIS Database published ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Michael Stonebraker' AND t5.keyphrasename = 'GIS Database';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08096", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When did Michael Stonebraker publish his GIS Database paper ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Michael Stonebraker' AND t5.keyphrasename = 'GIS Database';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08097", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When does Michael Stonebraker publish the GIS Database paper ?", "sql": "SELECT DISTINCT t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname = 'Michael Stonebraker' AND t5.keyphrasename = 'GIS Database';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08098", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "In 2010 what journal published an article about Trophic Cascade ?", "sql": "SELECT DISTINCT t3.journalid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'Trophic Cascade' AND t3.year = 2010 GROUP BY t3.journalid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08099", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the most popular paper this year in CVPR ?", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citingpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2016 AND t2.venuename = 'CVPR' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08100", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many citations does luke zettlemoyer have per year", "sql": "SELECT DISTINCT COUNT(t4.citedpaperid), t3.year FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'luke zettlemoyer' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08101", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "authors working on ImageNet", "sql": "SELECT DISTINCT t2.paperid FROM paperdataset AS t3 JOIN dataset AS t1 ON t3.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t3.paperid JOIN writes AS t2 ON t2.paperid = t4.paperid WHERE t1.datasetname = 'ImageNet' GROUP BY t2.paperid;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08102", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What articles have been published since 2006 about the effects of juicing for cancer patients ?", "sql": "SELECT DISTINCT paperid, title FROM paper WHERE title ILIKE 'the effects of juicing for cancer patients' AND YEAR > 2006;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08103", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Eric C. Kerrigan 's Liquid Automatica paper", "sql": "SELECT DISTINCT t2.paperid FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname = 'Eric C. Kerrigan' AND t3.keyphrasename = 'Liquid' AND t6.venuename = 'Automatica';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08104", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Where did sergey levine publish his last paper ?", "sql": "SELECT DISTINCT t3.venueid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'sergey levine' GROUP BY t3.venueid, t3.year ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08105", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "keyphrases used by dan klein in his emnlp papers", "sql": "SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid JOIN writes AS t5 ON t5.paperid = t3.paperid JOIN author AS t1 ON t5.authorid = t1.authorid WHERE t1.authorname = 'dan klein' AND t4.venuename = 'emnlp';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08106", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Who are the prominent researchers in Neutralizing Antibody in 2012 ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'Neutralizing Antibody' AND t4.year = 2012 GROUP BY t3.authorid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08107", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "the papers at eccv in 2014 using ImageNet dataset", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'ImageNet' AND t3.year = 2014 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08108", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which papers in eccv 2014 use ImageNet ?", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'ImageNet' AND t3.year = 2014 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08109", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "eccv 2014 papers using ImageNet", "sql": "SELECT DISTINCT t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'ImageNet' AND t3.year = 2014 AND t4.venuename = 'eccv';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08110", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Euclidean Distance papers citing NIPS papers", "sql": "SELECT DISTINCT t5.citingpaperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN cite AS t5 ON t2.paperid = t5.citingpaperid JOIN paper AS t3 ON t3.paperid = t5.citedpaperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.keyphrasename = 'Euclidean Distance' AND t4.venuename = 'NIPS';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08111", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "top authors working on ImageNet ?", "sql": "SELECT DISTINCT COUNT(t4.paperid), t3.paperid FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t4 ON t4.paperid = t2.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t1.datasetname = 'ImageNet' GROUP BY t3.paperid ORDER BY COUNT(t4.paperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08112", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "how many ACL 2012 papers have more than 7 citations ?", "sql": "SELECT DISTINCT (t1.paperid), COUNT(t3.citingpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t1.year = 2012 AND t2.venuename = 'ACL' GROUP BY t1.paperid HAVING COUNT(t3.citingpaperid) > 7;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08113", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What was the topic of best paper in 2012 EMNLP-CoNLL ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t4.citingpaperid), t1.keyphraseid, t2.paperid FROM paper AS t2 JOIN cite AS t4 ON t2.paperid = t4.citedpaperid JOIN paperkeyphrase AS t1 ON t2.paperid = t1.paperid JOIN venue AS t3 ON t3.venueid = t2.venueid WHERE t2.year = 2012 AND t3.venuename = 'EMNLP-CoNLL' GROUP BY t2.paperid, t1.keyphraseid ORDER BY COUNT(DISTINCT t4.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08114", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers has Noah Smith co-authored since 2009 ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t2.paperid) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname <> 'Noah Smith' AND t3.year > 2009 AND t2.paperid IN (SELECT t2.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname ILIKE 'Noah Smith');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08115", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Number of ACL papers with more than 2 citations", "sql": "SELECT DISTINCT COUNT(t3.citingpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'ACL' GROUP BY t3.citingpaperid HAVING COUNT(DISTINCT t3.citedpaperid) > 2;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08116", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the name of Eric C. Kerrigan 's Liquid Automatica paper ?", "sql": "SELECT DISTINCT t2.title FROM paperkeyphrase AS t5 JOIN keyphrase AS t3 ON t5.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t5.paperid JOIN paper AS t2 ON t4.paperid = t2.paperid JOIN author AS t1 ON t4.authorid = t1.authorid JOIN venue AS t6 ON t6.venueid = t2.venueid WHERE t1.authorname ILIKE 'Eric C. Kerrigan' AND t3.keyphrasename = 'Liquid' AND t6.venuename = 'Automatica';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08117", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers used ImageNet datasets in cvpr ?", "sql": "SELECT DISTINCT COUNT(t3.paperid) FROM paperdataset AS t2 JOIN dataset AS t1 ON t2.datasetid = t1.datasetid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t1.datasetname = 'ImageNet' AND t4.venuename = 'cvpr';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08118", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What venues are for Neuroscience ?", "sql": "SELECT DISTINCT venueid FROM venue WHERE venuename = 'Neuroscience';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08119", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "When was the last time Mary Crainie published a paper ?", "sql": "SELECT DISTINCT MAX(t3.year) FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Mary Crainie';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08120", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "I want the co-authors of papers on Machine Translation Output with Philipp Koehn", "sql": "SELECT DISTINCT t1.authorid FROM paperkeyphrase AS t6 JOIN keyphrase AS t3 ON t6.keyphraseid = t3.keyphraseid JOIN writes AS t4 ON t4.paperid = t6.paperid JOIN writes AS t5 ON t5.paperid = t4.paperid JOIN author AS t1 ON t5.authorid = t1.authorid JOIN author AS t2 ON t4.authorid = t2.authorid WHERE t2.authorname = 'Philipp Koehn' AND t3.keyphrasename = 'Machine Translation Output';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08121", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many papers does Samuel Madden publish outside of PVLDB area ?", "sql": "SELECT DISTINCT COUNT(DISTINCT t3.paperid) FROM venue AS t4 JOIN paper AS t3 ON t4.venueid = t3.venueid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = 'Samuel Madden' AND t4.venuename <> 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08122", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "which journal did Donald E Knuth publish his last paper ?", "sql": "SELECT DISTINCT t3.journalid, t3.year FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Donald E Knuth' GROUP BY t3.journalid, t3.year ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08123", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the venue of Fracture of acrylic bone cement ?", "sql": "SELECT DISTINCT venueid FROM paper WHERE title = 'Fracture of acrylic bone cement';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08124", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "How many authors published at sigcse in 2010 ?", "sql": "SELECT DISTINCT COUNT(t2.paperid) FROM venue AS t3 JOIN paper AS t2 ON t3.venueid = t2.venueid JOIN writes AS t1 ON t1.paperid = t2.paperid WHERE t2.year = 2010 AND t3.venuename = 'sigcse';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08125", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the year of publication of \" A Switching Architecture For ISDN \" ?", "sql": "SELECT DISTINCT title, YEAR FROM paper WHERE title = 'A Switching Architecture For ISDN';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08126", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "what keywords are used by papers at uist", "sql": "SELECT DISTINCT t1.keyphraseid FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid WHERE t4.venuename = 'uist';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08127", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "Give me the papers written by Su-In Lee before 2012 .", "sql": "SELECT DISTINCT t3.paperid FROM writes AS t2 JOIN author AS t1 ON t2.authorid = t1.authorid JOIN paper AS t3 ON t2.paperid = t3.paperid WHERE t1.authorname = 'Su-In Lee' AND t3.year < 2012;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08128", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers in semantic parsing for each year", "sql": "SELECT DISTINCT COUNT(t3.paperid), t3.year FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid WHERE t1.keyphrasename = 'semantic parsing' GROUP BY t3.year ORDER BY t3.year DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08129", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers with at least 5 citations", "sql": "SELECT DISTINCT t2.citingpaperid FROM paper AS t1 JOIN cite AS t2 ON t1.paperid = t2.citedpaperid GROUP BY t2.citingpaperid HAVING COUNT(DISTINCT t2.citedpaperid) >= 5;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08130", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "papers cited by at least 5 papers", "sql": "SELECT DISTINCT t2.citingpaperid FROM paper AS t1 JOIN cite AS t2 ON t1.paperid = t2.citedpaperid GROUP BY t2.citingpaperid HAVING COUNT(DISTINCT t2.citedpaperid) >= 5;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08131", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the most cited paper at sigcomm ?", "sql": "SELECT DISTINCT t3.citedpaperid, COUNT(t3.citingpaperid) FROM paper AS t1 JOIN cite AS t3 ON t1.paperid = t3.citedpaperid JOIN venue AS t2 ON t2.venueid = t1.venueid WHERE t2.venuename = 'sigcomm' GROUP BY t3.citedpaperid ORDER BY COUNT(t3.citingpaperid) DESC;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08132", "db_id": "scholar", "schema_text": "CREATE TABLE author (authorId BIGINT, authorName VARCHAR);\nCREATE TABLE cite (citingPaperId BIGINT, citedPaperId BIGINT);\nCREATE TABLE dataset (datasetId BIGINT, datasetName VARCHAR);\nCREATE TABLE journal (journalId BIGINT, journalName VARCHAR);\nCREATE TABLE keyphrase (keyphraseId BIGINT, keyphraseName VARCHAR);\nCREATE TABLE paper (paperId BIGINT, title VARCHAR, venueId BIGINT, year BIGINT, numCiting BIGINT, numCitedBy BIGINT, journalId BIGINT);\nCREATE TABLE paperDataset (paperId BIGINT, datasetId BIGINT);\nCREATE TABLE paperKeyphrase (paperId BIGINT, keyphraseId BIGINT);\nCREATE TABLE venue (venueId BIGINT, venueName VARCHAR);\nCREATE TABLE writes (paperId BIGINT, authorId BIGINT);", "question": "What is the name of Ranjit Jhala 's Liquid Haskell paper ?", "sql": "SELECT DISTINCT t3.title FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN writes AS t4 ON t4.paperid = t2.paperid JOIN paper AS t3 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname ILIKE 'Ranjit Jhala' AND t5.keyphrasename = 'Liquid Haskell';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08133", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the businesses with more than 4.5 stars", "sql": "SELECT name FROM business WHERE rating > 4.5;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08134", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all businesses with rating 3.5", "sql": "SELECT name FROM business WHERE rating = 3.5;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08135", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all user ids with name Michelle", "sql": "SELECT user_id FROM \"USER\" WHERE name = 'Michelle';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08136", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all states in which there is a Whataburger", "sql": "SELECT state FROM business WHERE name = 'Whataburger';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08137", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all cities in which there is a restaurant called \" MGM Grand Buffet \"", "sql": "SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'MGM Grand Buffet' AND t2.category_name = 'category_category_name0';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08138", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the cities of businesses rated below 1.5", "sql": "SELECT city FROM business WHERE rating < 1.5;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08139", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all cities which has a \" Taj Mahal \" .", "sql": "SELECT city FROM business WHERE name = 'Taj Mahal';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08140", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the reviews which rated a business less than 1", "sql": "SELECT text FROM review WHERE rating < 1;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08141", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the restaurant rated more than 3.5", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08142", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find all cities which has a \" Taj Mahal \" restaurant", "sql": "SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Taj Mahal' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08143", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "list all the reviews by Niloofar", "sql": "SELECT t1.text FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = 'Niloofar';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08144", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "list all the businesses which have a review by Niloofar", "sql": "SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t3.name = 'Niloofar';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08145", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "list all the businesses which Niloofar rated 5", "sql": "SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t2.rating = 5 AND t3.name = 'Niloofar';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08146", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the reviews by Michelle for Italian restaurant", "sql": "SELECT t4.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN review AS t4 ON t4.business_id = t1.business_id JOIN \"USER\" AS t5 ON t5.user_id = t4.user_id WHERE t2.category_name = 'Italian' AND t3.category_name = 'category_category_name1' AND t5.name = 'Michelle';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08147", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the number of reviews written for \" Cafe Zinho \" restaurant in Texas", "sql": "SELECT COUNT(DISTINCT t3.text) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.name = 'Cafe Zinho' AND t1.state = 'Texas' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08148", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all 5 star Italian restaurant", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.rating = 5 AND t2.category_name = 'Italian' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08149", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the neighbourhoods with Italian restaurant in Madison", "sql": "SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = 'Madison' AND t3.category_name = 'Italian' AND t4.category_name = 'restaurant';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08150", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the neighbourhoods with Italian restaurant rated less than 2.5 in Madison", "sql": "SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN category AS t4 ON t4.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.city = 'Madison' AND t2.rating < 2.5 AND t3.category_name = 'Italian' AND t4.category_name = 'restaurant';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08151", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find all the restaurant in Pennsylvania", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = 'Pennsylvania' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08152", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all businesses that are restaurant in Pennsylvania .", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = 'Pennsylvania' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08153", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all the reviews for all Pet Groomers with more than 100 reviews", "sql": "SELECT t3.text FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id WHERE t1.review_count > 100 AND t2.category_name = 'Pet Groomers';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08154", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What are all the breweries in \" Los Angeles \" ?", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'breweries';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08155", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all breweries in Los Angeles", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'breweries';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08157", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all users who reviewed restaurant \" Mesa Grill \"", "sql": "SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.name = 'Mesa Grill' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08158", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List the addresses of all Walmart in \" Los Angeles \"", "sql": "SELECT full_address FROM business WHERE city = 'Los Angeles' AND name = 'Walmart';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08159", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all restaurant reviewed by Patrick in \" Dallas \"", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.city = 'Dallas' AND t2.category_name = 'restaurant' AND t4.name = 'Patrick';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08160", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Which restaurant in Dallas were reviewed by user Patrick ?", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.city = 'Dallas' AND t2.category_name = 'restaurant' AND t4.name = 'Patrick';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08161", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Bars reviewed by Patrick", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = 'Bars' AND t4.name = 'Patrick';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08162", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Bars reviewed by Patrick with at least 3 stars", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.rating >= 3 AND t2.category_name = 'Bars' AND t4.name = 'Patrick';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08163", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all users who have written tips for \" Barrio Cafe \" in 2015", "sql": "SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.name = 'Barrio Cafe' AND t2.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08164", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all businesses in Texas with a rating below 2", "sql": "SELECT name FROM business WHERE rating < 2 AND state = 'Texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08165", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all restaurant Seafood in Los Angeles", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'Seafood' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08166", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all the Seafood restaurant in \" Los Angeles \"", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'Seafood' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08167", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all restaurant that serve Seafood in \" Los Angeles \"", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'Seafood' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08168", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all reviews by Patrick with a rating above 4", "sql": "SELECT t1.text FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.rating > 4 AND t2.name = 'Patrick';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08169", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Apple Store in \" Los Angeles \"", "sql": "SELECT business_id FROM business WHERE city = 'Los Angeles' AND name = 'Apple Store';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08170", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Dallas restaurant with a rating above 4.5", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t1.rating > 4.5 AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08171", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What neighbourhood is restaurant \" Flat Top Grill \" in ?", "sql": "SELECT t1.neighbourhood_name FROM category AS t3 JOIN business AS t2 ON t3.business_id = t2.business_id JOIN neighbourhood AS t1 ON t1.business_id = t2.business_id WHERE t2.name = 'Flat Top Grill' AND t3.category_name = 'category_category_name0';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08172", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all tips about \" Vintner Grill \" that received more than 9 likes", "sql": "SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Vintner Grill' AND t2.likes > 9;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08173", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all reviews about \" Kabob Palace \" in year 2014", "sql": "SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Kabob Palace' AND t2.year = 2014;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08174", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all users who have written tips about businesses in Dallas", "sql": "SELECT t3.name FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.city = 'Dallas';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08175", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all cities in Texas in which there is a restaurant called \" MGM Grand Buffet \"", "sql": "SELECT t1.city FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'MGM Grand Buffet' AND t1.state = 'Texas' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08176", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the users who have given tips on Pet Groomers", "sql": "SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN tip AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = 'Pet Groomers';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08177", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all tips for \" Cafe Zinho \" in Texas .", "sql": "SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Cafe Zinho' AND t1.state = 'Texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08178", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all users who reviewed businesses that are restaurant .", "sql": "SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08179", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all tips for \" Cafe Zinho \" in Pennsylvania in 2010 .", "sql": "SELECT t2.text FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Cafe Zinho' AND t1.state = 'Pennsylvania' AND t2.year = 2010;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08180", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "List all users who reviewed businesses that are restaurant in 2010 .", "sql": "SELECT t4.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t2.category_name = 'restaurant' AND t3.year = 2010;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08181", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all the tips from a user who has written a review in 2012", "sql": "SELECT t2.text FROM \"USER\" AS t3 JOIN review AS t1 ON t3.user_id = t1.user_id JOIN tip AS t2 ON t3.user_id = t2.user_id WHERE t1.year = 2012;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08182", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all reviews for businesses rated 2.5", "sql": "SELECT t2.text FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating = 2.5;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08183", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the number of escape games in Madison", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t2.category_name = 'escape games';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08184", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the number of escape games in Madison", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t2.category_name = 'escape games';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08185", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many escape games exist in Madison", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t2.category_name = 'escape games';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08187", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many escape games are there in Madison ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t2.category_name = 'escape games';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08188", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the number of restaurant rated more than 3.5", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.rating > 3.5 AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08189", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \"", "sql": "SELECT SUM(t4.count) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'restaurant' AND t3.category_name = 'Moroccan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08190", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \" on Friday", "sql": "SELECT SUM(t4.count) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'Moroccan' AND t3.category_name = 'restaurant' AND t4.day = 'Friday';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08191", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \" per day", "sql": "SELECT t4.day, SUM(t4.count) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t2.category_name = 'Moroccan' AND t3.category_name = 'restaurant' GROUP BY t4.day;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08192", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "find the total checkins in Italian Delis in each state on Sunday", "sql": "SELECT t1.state, SUM(t4.count) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id JOIN checkin AS t4 ON t4.business_id = t1.business_id WHERE t2.category_name = 'Italian' AND t3.category_name = 'Delis' AND t4.day = 'Sunday' GROUP BY t1.state;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08193", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many reviews has Niloofar written in 2015", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2015 AND t2.name = 'Niloofar';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08194", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "what is the average rating given in Michelle reviews", "sql": "SELECT AVG(t1.rating) FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08195", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the number of checkins for \" Cafe Zinho \" on Friday", "sql": "SELECT t2.count FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Cafe Zinho' AND t2.day = 'Friday';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08196", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "how many users reviewed \" Sushi Too \" in Pittsburgh", "sql": "SELECT COUNT(DISTINCT t3.name) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.city = 'Pittsburgh' AND t1.name = 'Sushi Too';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08197", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the number of restaurant in Pittsburgh rated 4.5", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Pittsburgh' AND t1.rating = 4.5 AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08198", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many tips have been written in 2015", "sql": "SELECT COUNT(DISTINCT text) FROM tip WHERE YEAR = 2015;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08199", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the total likes on tips from Niloofar", "sql": "SELECT SUM(t1.likes) FROM \"USER\" AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = 'Niloofar';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08200", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the total likes on tips about \" Cafe Zinho \"", "sql": "SELECT SUM(t2.likes) FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.name = 'Cafe Zinho';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08201", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the total likes on tips from Niloofar about \" Cafe Zinho \"", "sql": "SELECT SUM(t2.likes) FROM tip AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.name = 'Cafe Zinho' AND t3.name = 'Niloofar';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08202", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many tips has Michelle written in 2010", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2010 AND t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08203", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Return me the number of tips that are written by Michelle in 2010 .", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.year = 2010 AND t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08204", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many tips has Michelle written in April", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t1.month = 'April' AND t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08205", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "what is the number of restaurant in Texas", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.state = 'Texas' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08206", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many Bars in \" Dallas \" have a rating above 3.5 ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t1.rating > 3.5 AND t2.category_name = 'Bars';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08208", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "sql": "SELECT COUNT(DISTINCT t4.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.city = 'Dallas' AND t1.name = 'Texas de Brazil' AND t1.state = 'Texas' AND t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08209", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many people reviewed \" Bistro Di Napoli \" in 2015 ?", "sql": "SELECT COUNT(DISTINCT t3.name) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.name = 'Bistro Di Napoli' AND t2.year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08210", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many restaurant are there in the Hazelwood district of Dallas ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t3.category_name = 'restaurant' AND t2.neighbourhood_name = 'Hazelwood';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08211", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many Starbucks are there in Dallas Texas ?", "sql": "SELECT COUNT(DISTINCT business_id) FROM business WHERE city = 'Dallas' AND name = 'Starbucks' AND state = 'Texas';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08212", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many reviews does \" Acacia Cafe \" have ?", "sql": "SELECT review_count FROM business WHERE name = 'Acacia Cafe';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08213", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the average number of checkins in restaurant \" Barrio Cafe \" per day", "sql": "SELECT AVG(t3.count), t3.day FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN checkin AS t3 ON t3.business_id = t1.business_id WHERE t1.name = 'Barrio Cafe' AND t2.category_name = 'restaurant' GROUP BY t3.day;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08214", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many businesses are there in the \" Stone Meadows \" neighbourhood in Madison ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM neighbourhood AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t2.neighbourhood_name = 'Stone Meadows';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08215", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many reviews has Adrienne written ?", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t2.name = 'Adrienne';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08216", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many reviews has Michelle written in March 2014 ?", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id WHERE t1.month = 'March' AND t1.year = 2014 AND t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08217", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many businesses has Michelle reviewed in 2010 ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t2.year = 2010 AND t3.name = 'Michelle';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08218", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many businesses in \" San Diego \" has Christine reviewed in 2010 ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN \"USER\" AS t3 ON t3.user_id = t2.user_id WHERE t1.city = 'San Diego' AND t2.year = 2010 AND t3.name = 'Christine';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08219", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many Target are there in \" Los Angeles \" ?", "sql": "SELECT COUNT(DISTINCT business_id) FROM business WHERE city = 'Los Angeles' AND name = 'Target';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08220", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many users have reviewed Irish Pub in Dallas ?", "sql": "SELECT COUNT(DISTINCT t4.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.city = 'Dallas' AND t2.category_name = 'Irish Pub';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08221", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "What is the average rating of reviews written in year 2014 ?", "sql": "SELECT AVG(rating) FROM review WHERE YEAR = 2014;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08222", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many people reviewed restaurant \" Vintner Grill \" in 2010 ?", "sql": "SELECT COUNT(DISTINCT t4.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN \"USER\" AS t4 ON t4.user_id = t3.user_id WHERE t1.name = 'Vintner Grill' AND t2.category_name = 'category_category_name0' AND t3.year = 2010;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08223", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the number of reviews on businesses located in \" South Summerlin \" neighbourhood", "sql": "SELECT COUNT(DISTINCT t3.text) FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id JOIN review AS t3 ON t3.business_id = t2.business_id WHERE t1.neighbourhood_name = 'South Summerlin';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08224", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the number of users called Michelle", "sql": "SELECT COUNT(DISTINCT name) FROM \"USER\" WHERE name = 'Michelle';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08225", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Return me the number of businesses that are restaurant .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t2.category_name = 'restaurant';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08226", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Return me the number of cities that has \" Panda Express \" .", "sql": "SELECT COUNT(DISTINCT city) FROM business WHERE name = 'Panda Express';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08227", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Return me the number of tips that are written by Michelle .", "sql": "SELECT COUNT(DISTINCT t1.text) FROM \"USER\" AS t2 JOIN tip AS t1 ON t2.user_id = t1.user_id WHERE t2.name = 'Michelle';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08228", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the total checkins in \" Brighton Heights \" neighbourhood", "sql": "SELECT SUM(t3.count) FROM checkin AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t2.neighbourhood_name = 'Brighton Heights';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08229", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the total number of reviews written in March", "sql": "SELECT COUNT(DISTINCT text) FROM review WHERE MONTH = 'March';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08230", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the number of tips written in each month", "sql": "SELECT COUNT(DISTINCT text), MONTH FROM tip GROUP BY MONTH;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08231", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many neighbourhoods have a business with rating 5 in Madison ?", "sql": "SELECT COUNT(DISTINCT t1.neighbourhood_name) FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id WHERE t2.city = 'Madison' AND t2.rating = 5;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08232", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Give me all the Moroccan restaurant in Texas", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.state = 'Texas' AND t2.category_name = 'Moroccan' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08233", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "which business has the most number of checkins", "sql": "SELECT t1.name FROM checkin AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id GROUP BY t1.name ORDER BY SUM(t2.count) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08234", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "which neighbourhood has the most number of businesses in Madison", "sql": "SELECT t1.neighbourhood_name FROM neighbourhood AS t1 JOIN business AS t2 ON t1.business_id = t2.business_id WHERE t2.city = 'Madison' GROUP BY t1.neighbourhood_name ORDER BY COUNT(DISTINCT t2.name) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08235", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Mexican restaurant in Dallas with at least 3.5 stars", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t1.rating > 3.5 AND t2.category_name = 'Mexican' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08236", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Mexican restaurant in Dallas with a rating above 3.5", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t1.rating > 3.5 AND t2.category_name = 'Mexican' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08237", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all restaurant with Valet Service in Dallas Texas", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Dallas' AND t1.state = 'Texas' AND t2.category_name = 'Valet Service' AND t3.category_name = 'restaurant';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08238", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Italian restaurant in the Meadowood neighbourhood of Madison", "sql": "SELECT t1.name FROM category AS t3 JOIN business AS t1 ON t3.business_id = t1.business_id JOIN category AS t4 ON t4.business_id = t1.business_id JOIN neighbourhood AS t2 ON t2.business_id = t1.business_id WHERE t1.city = 'Madison' AND t3.category_name = 'Italian' AND t4.category_name = 'restaurant' AND t2.neighbourhood_name = 'Meadowood';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08239", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find all Bars in \" Los Angeles \" with at least 30 reviews and average rating above 3 stars", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t1.city = 'Los Angeles' AND t1.rating > 3 AND t1.review_count > 30 AND t2.category_name = 'Bars';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08240", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "How many Egyptian restaurant are there in Edinburgh ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN category AS t3 ON t3.business_id = t1.business_id WHERE t1.city = 'Edinburgh' AND t2.category_name = 'restaurant' AND t3.category_name = 'Egyptian';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08241", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find users whose average review rating is below 3", "sql": "SELECT t2.name FROM \"USER\" AS t2 JOIN review AS t1 ON t2.user_id = t1.user_id GROUP BY t2.name HAVING AVG(t1.rating) < 3;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08242", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the business with the most number of reviews in April", "sql": "SELECT t1.name FROM review AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id WHERE t2.month = 'April' GROUP BY t1.name ORDER BY COUNT(DISTINCT t2.text) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08243", "db_id": "yelp", "schema_text": "CREATE TABLE business (bid BIGINT, business_id VARCHAR, name VARCHAR, full_address VARCHAR, city VARCHAR, latitude VARCHAR, longitude VARCHAR, review_count BIGINT, is_open BIGINT, rating DOUBLE, state VARCHAR);\nCREATE TABLE category (id BIGINT, business_id VARCHAR, category_name VARCHAR);\nCREATE TABLE checkin (cid BIGINT, business_id VARCHAR, count BIGINT, day VARCHAR);\nCREATE TABLE neighbourhood (id BIGINT, business_id VARCHAR, neighbourhood_name VARCHAR);\nCREATE TABLE review (rid BIGINT, business_id VARCHAR, user_id VARCHAR, rating DOUBLE, text VARCHAR, year BIGINT, month VARCHAR);\nCREATE TABLE tip (tip_id BIGINT, business_id VARCHAR, text VARCHAR, user_id VARCHAR, likes BIGINT, year BIGINT, month VARCHAR);\nCREATE TABLE user (uid BIGINT, user_id VARCHAR, name VARCHAR);", "question": "Find the business which has the most number of categories", "sql": "SELECT t1.name FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id GROUP BY t1.name ORDER BY COUNT(DISTINCT t2.category_name) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08244", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the homepage of PVLDB .", "sql": "SELECT homepage FROM journal WHERE name = 'PVLDB';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08245", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the homepage of \" H. V. Jagadish \" .", "sql": "SELECT homepage FROM author WHERE name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08246", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the abstract of \" Making database systems usable \" .", "sql": "SELECT abstract FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08247", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the year of \" Making database systems usable \"", "sql": "SELECT YEAR FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08249", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers after 2000 .", "sql": "SELECT title FROM publication WHERE YEAR > 2000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08250", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the homepage of the VLDB conference .", "sql": "SELECT homepage FROM conference WHERE name = 'VLDB';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08251", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the keywords .", "sql": "SELECT keyword FROM keyword;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08252", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the organizations .", "sql": "SELECT name FROM organization;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08253", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the organizations in \" North America \" .", "sql": "SELECT name FROM organization WHERE continent = 'North America';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08254", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the homepage of \" University of Michigan \" .", "sql": "SELECT homepage FROM organization WHERE name = 'University of Michigan';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08255", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of references of \" Making database systems usable \" .", "sql": "SELECT reference_num FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08256", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the references of \" Making database systems usable \" .", "sql": "SELECT reference_num FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08257", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of citations of \" Making database systems usable \" .", "sql": "SELECT citation_num FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08258", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the citations of \" Making database systems usable \" .", "sql": "SELECT citation_num FROM publication WHERE title = 'Making database systems usable';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08259", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper with more than 200 citations .", "sql": "SELECT title FROM publication WHERE citation_num > 200;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08260", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in PVLDB 2010 .", "sql": "SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB' AND t4.year = 2010;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08261", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in PVLDB after 2010 .", "sql": "SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB' AND t4.year > 2010;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08262", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in VLDB conference in 2002 .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB' AND t4.year = 2002;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08263", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in VLDB conference before 2002 .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB' AND t4.year < 2002;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08264", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in VLDB conference before 2002 after 1995 .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB' AND t4.year < 2002 AND t4.year > 1995;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08265", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the area of PVLDB .", "sql": "SELECT t3.name FROM DOMAIN AS t3 JOIN domain_journal AS t1 ON t3.did = t1.did JOIN journal AS t2 ON t2.jid = t1.jid WHERE t2.name = 'PVLDB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08266", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in PVLDB .", "sql": "SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08267", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the organization \" H. V. Jagadish \" is in .", "sql": "SELECT t2.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08268", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conferences, which have papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08269", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journals, which have papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08270", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the domain where \" H. V. Jagadish \" is focused .", "sql": "SELECT t2.name FROM domain_author AS t3 JOIN author AS t1 ON t3.aid = t1.aid JOIN DOMAIN AS t2 ON t2.did = t3.did WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08271", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors of \" Making database systems usable \" .", "sql": "SELECT t1.name FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t3.title = 'Making database systems usable';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08272", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conference, which published \" Making database systems usable \" .", "sql": "SELECT t1.name FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t2.title = 'Making database systems usable';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08273", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" .", "sql": "SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08274", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers on VLDB conference .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08275", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers on PVLDB .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08276", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers on PVLDB after 2000 .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08277", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers on VLDB conference after 2000 .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08278", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on PVLDB .", "sql": "SELECT t4.title FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08279", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on VLDB conference .", "sql": "SELECT t4.title FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08280", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" after 2000 .", "sql": "SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish' AND t3.year > 2000;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08281", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on PVLDB after 2000 .", "sql": "SELECT t4.title FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'PVLDB' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08282", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on VLDB conference after 2000 .", "sql": "SELECT t4.title FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'VLDB' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08283", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the area of the VLDB conference .", "sql": "SELECT t2.name FROM domain_conference AS t3 JOIN conference AS t1 ON t3.cid = t1.cid JOIN DOMAIN AS t2 ON t2.did = t3.did WHERE t1.name = 'VLDB';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08284", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers in the VLDB conference .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08285", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the keywords in Databases area .", "sql": "SELECT t1.keyword FROM DOMAIN AS t3 JOIN domain_keyword AS t2 ON t3.did = t2.did JOIN keyword AS t1 ON t1.kid = t2.kid WHERE t3.name = 'Databases';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08286", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers, which contain the keyword \" Natural Language \" .", "sql": "SELECT t3.title FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t3 ON t3.pid = t2.pid WHERE t1.keyword = 'Natural Language';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08287", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords of \" Making database systems usable \" .", "sql": "SELECT t1.keyword FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t2 ON t2.pid = t3.pid WHERE t2.title = 'Making database systems usable';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08288", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords related to \" H. V. Jagadish \" .", "sql": "SELECT t1.keyword FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08289", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords in VLDB conference .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08290", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords in PVLDB .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08291", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords in the papers of \" University of Michigan \" .", "sql": "SELECT t1.keyword FROM organization AS t6 JOIN author AS t2 ON t6.oid = t2.oid JOIN writes AS t4 ON t4.aid = t2.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN publication_keyword AS t3 ON t5.pid = t3.pid JOIN keyword AS t1 ON t3.kid = t1.kid WHERE t6.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08292", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers of \" H. V. Jagadish \" containing keyword \" User Study \" .", "sql": "SELECT t5.title FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t5 ON t5.pid = t3.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' AND t1.keyword = 'User Study';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08293", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers in PVLDB containing keyword \" Keyword search \" .", "sql": "SELECT t4.title FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t4 ON t4.pid = t2.pid JOIN journal AS t3 ON t4.jid = t3.jid WHERE t3.name = 'PVLDB' AND t1.keyword = 'Keyword search';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08294", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers in VLDB conference containing keyword \" Information Retrieval \" .", "sql": "SELECT t4.title FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t4 ON t4.pid = t3.pid JOIN conference AS t2 ON t4.cid = t2.cid WHERE t2.name = 'VLDB' AND t1.keyword = 'Information Retrieval';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08295", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = 'Relational Database';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08296", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the organizations in Databases area .", "sql": "SELECT t2.name FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08297", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the organizations in Databases area located in \" North America \" .", "sql": "SELECT t2.name FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.continent = 'North America';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08298", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the researchers in \" University of Michigan \" .", "sql": "SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08299", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the researchers in Databases area in \" University of Michigan \" .", "sql": "SELECT t1.name FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08300", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers in \" University of Michigan \" .", "sql": "SELECT t4.title FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08301", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers after 2000 in \" University of Michigan \" .", "sql": "SELECT t4.title FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08302", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers in VLDB conference in \" University of Michigan \" .", "sql": "SELECT t5.title FROM organization AS t3 JOIN author AS t1 ON t3.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN conference AS t2 ON t5.cid = t2.cid WHERE t2.name = 'VLDB' AND t3.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08303", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers in PVLDB in \" University of Michigan \" .", "sql": "SELECT t5.title FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN journal AS t3 ON t5.jid = t3.jid WHERE t3.name = 'PVLDB' AND t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08304", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me all the papers in PVLDB after 2000 in \" University of Michigan \" .", "sql": "SELECT t5.title FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN journal AS t3 ON t5.jid = t3.jid WHERE t3.name = 'PVLDB' AND t2.name = 'University of Michigan' AND t5.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08305", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in Databases area with more than 200 citations .", "sql": "SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = 'Databases' AND t3.citation_num > 200;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08306", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in PVLDB with more than 200 citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.citation_num > 200;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08307", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in VLDB conference with more than 200 citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.citation_num > 200;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08308", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper by \" H. V. Jagadish \" with more than 200 citations .", "sql": "SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish' AND t3.citation_num > 200;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08309", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on PVLDB with more than 200 citations .", "sql": "SELECT t4.title FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'PVLDB' AND t4.citation_num > 200;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08310", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers by \" H. V. Jagadish \" on VLDB conference with more than 200 citations .", "sql": "SELECT t4.title FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'VLDB' AND t4.citation_num > 200;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08311", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 with more than 200 citations .", "sql": "SELECT title FROM publication WHERE citation_num > 200 AND YEAR > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08312", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in Databases area with more than 200 citations .", "sql": "SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = 'Databases' AND t3.citation_num > 200 AND t3.year > 2000;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08313", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in PVLDB with more than 200 citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.citation_num > 200 AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08314", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in VLDB conference with more than 200 citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.citation_num > 200 AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08315", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of conferences which have papers by \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08316", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of journals which have papers by \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08317", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers written by \" H. V. Jagadish \" in each year .", "sql": "SELECT COUNT(DISTINCT t3.title), t3.year FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish' GROUP BY t3.year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08318", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors of \" Making database systems usable \" .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t3.title = 'Making database systems usable';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08319", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of citations of \" Making database systems usable \" in each year .", "sql": "SELECT YEAR, SUM(citation_num) FROM publication WHERE title = 'Making database systems usable' GROUP BY YEAR;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08320", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of citations of \" Making database systems usable \" before 2010 .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t3 JOIN cite AS t1 ON t3.pid = t1.cited JOIN publication AS t2 ON t2.pid = t1.citing WHERE t3.title = 'Making database systems usable' AND t2.year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08321", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t3.title) FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08322", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers on VLDB conference .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08323", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers on PVLDB .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08324", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers after 2000 .", "sql": "SELECT COUNT(DISTINCT title) FROM publication WHERE YEAR > 2000;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08325", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers on PVLDB after 2000 .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08326", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers on VLDB conference after 2000 .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08327", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" on PVLDB .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08328", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" on VLDB conference .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08329", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" after 2000 .", "sql": "SELECT COUNT(DISTINCT t3.title) FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish' AND t3.year > 2000;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08330", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" on PVLDB after 2000 .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'PVLDB' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08331", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers by \" H. V. Jagadish \" on VLDB conference after 2000 .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t2.name = 'VLDB' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08332", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of keywords .", "sql": "SELECT COUNT(DISTINCT keyword) FROM keyword;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08333", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of keywords in Databases area .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM DOMAIN AS t3 JOIN domain_keyword AS t2 ON t3.did = t2.did JOIN keyword AS t1 ON t1.kid = t2.kid WHERE t3.name = 'Databases';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08334", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers which contain the keyword \" Natural Language \" .", "sql": "SELECT COUNT(DISTINCT t3.title) FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t3 ON t3.pid = t2.pid WHERE t1.keyword = 'Natural Language';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08335", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of the keywords of \" Making database systems usable \" .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t2 ON t2.pid = t3.pid WHERE t2.title = 'Making database systems usable';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08336", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of the keywords related to \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08337", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of keywords in VLDB conference .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08338", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of keywords in PVLDB .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08339", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of keywords in the papers of \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t1.keyword) FROM organization AS t6 JOIN author AS t2 ON t6.oid = t2.oid JOIN writes AS t4 ON t4.aid = t2.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN publication_keyword AS t3 ON t5.pid = t3.pid JOIN keyword AS t1 ON t3.kid = t1.kid WHERE t6.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08340", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of the papers of \" H. V. Jagadish \" containing keyword \" User Study \" .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t5 ON t5.pid = t3.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' AND t1.keyword = 'User Study';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08341", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in PVLDB containing keyword \" Keyword search \" .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t4 ON t4.pid = t2.pid JOIN journal AS t3 ON t4.jid = t3.jid WHERE t3.name = 'PVLDB' AND t1.keyword = 'Keyword search';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08342", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in VLDB conference containing keyword \" Information Retrieval \" .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM publication_keyword AS t3 JOIN keyword AS t1 ON t3.kid = t1.kid JOIN publication AS t4 ON t4.pid = t3.pid JOIN conference AS t2 ON t4.cid = t2.cid WHERE t2.name = 'VLDB' AND t1.keyword = 'Information Retrieval';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08343", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors who have papers containing keyword \" Relational Database \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = 'Relational Database';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08344", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of the papers containing keyword \" Natural Language \"", "sql": "SELECT SUM(t3.citation_num) FROM publication_keyword AS t2 JOIN keyword AS t1 ON t2.kid = t1.kid JOIN publication AS t3 ON t3.pid = t2.pid WHERE t1.keyword = 'Natural Language';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08345", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of the organizations .", "sql": "SELECT COUNT(DISTINCT name) FROM organization;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08346", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of the organizations in \" North America \" .", "sql": "SELECT COUNT(DISTINCT name) FROM organization WHERE continent = 'North America';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08347", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of organizations in Databases area .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08348", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of organizations in Databases area located in \" North America \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.continent = 'North America';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08349", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08350", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in \" University of Michigan \" in Databases area .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM domain_author AS t6 JOIN author AS t1 ON t6.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t6.did JOIN domain_publication AS t2 ON t3.did = t2.did JOIN organization AS t5 ON t5.oid = t1.oid JOIN publication AS t4 ON t4.pid = t2.pid WHERE t3.name = 'Databases' AND t5.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08351", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers after 2000 in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t4.title) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan' AND t4.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08352", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in VLDB conference in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM organization AS t3 JOIN author AS t1 ON t3.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN conference AS t2 ON t5.cid = t2.cid WHERE t2.name = 'VLDB' AND t3.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08353", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in PVLDB in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN journal AS t3 ON t5.jid = t3.jid WHERE t3.name = 'PVLDB' AND t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08354", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers in PVLDB after 2000 in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t4 ON t4.aid = t1.aid JOIN publication AS t5 ON t4.pid = t5.pid JOIN journal AS t3 ON t5.jid = t3.jid WHERE t3.name = 'PVLDB' AND t2.name = 'University of Michigan' AND t5.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08355", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of the papers in \" University of Michigan \" .", "sql": "SELECT SUM(t4.citation_num) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08356", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of researchers in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid WHERE t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08357", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of researchers in Databases area in \" University of Michigan \" .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM domain_author AS t4 JOIN author AS t1 ON t4.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t4.did JOIN organization AS t2 ON t2.oid = t1.oid WHERE t3.name = 'Databases' AND t2.name = 'University of Michigan';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08358", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors who have papers in PVLDB .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08359", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors who have papers in the VLDB conference .", "sql": "SELECT COUNT(DISTINCT t1.name) FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08360", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers published on PVLDB before 2000 .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year < 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08361", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers published in the VLDB conference before 2000 .", "sql": "SELECT COUNT(DISTINCT t2.title) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year < 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08362", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of all the papers in PVLDB .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08363", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the citations of each paper in PVLDB .", "sql": "SELECT t2.citation_num FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08364", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in PVLDB in 2005 .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year = 2005;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08365", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in PVLDB before 2005 .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year < 2005;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08366", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in PVLDB in each year .", "sql": "SELECT t2.year, SUM(t2.citation_num) FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' GROUP BY t2.year;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08367", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers published in PVLDB in each year .", "sql": "SELECT COUNT(DISTINCT t2.title), t2.year FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' GROUP BY t2.year;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08368", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of all the papers in the VLDB conference .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08369", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the citations of each paper in the VLDB conference .", "sql": "SELECT t2.citation_num FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08370", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in the VLDB conference in 2005 .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year = 2005;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08371", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in the VLDB conference before 2005 .", "sql": "SELECT SUM(t2.citation_num) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year < 2005;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08372", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the total citations of papers in the VLDB conference in each year .", "sql": "SELECT t2.year, SUM(t2.citation_num) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' GROUP BY t2.year;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08373", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers published in the VLDB conference in each year .", "sql": "SELECT COUNT(DISTINCT t2.title), t2.year FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' GROUP BY t2.year;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08374", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have cooperated both with \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "sql": "SELECT t2.name FROM writes AS t4 JOIN author AS t2 ON t4.aid = t2.aid JOIN publication AS t7 ON t4.pid = t7.pid JOIN writes AS t5 ON t5.pid = t7.pid JOIN writes AS t6 ON t6.pid = t7.pid JOIN author AS t1 ON t5.aid = t1.aid JOIN author AS t3 ON t6.aid = t3.aid WHERE t1.name = 'H. V. Jagadish' AND t3.name = 'Divesh Srivastava';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08375", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have cooperated with \" H. V. Jagadish \" after 2000 .", "sql": "SELECT t2.name FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' AND t5.year > 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08376", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "sql": "SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Divesh Srivastava';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08377", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" after 2005 .", "sql": "SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Yunyao Li' AND t5.year > 2005;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08378", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" on PVLDB .", "sql": "SELECT t6.title FROM publication AS t6 JOIN journal AS t4 ON t6.jid = t4.jid JOIN writes AS t3 ON t3.pid = t6.pid JOIN writes AS t5 ON t5.pid = t6.pid JOIN author AS t1 ON t5.aid = t1.aid JOIN author AS t2 ON t3.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Yunyao Li' AND t4.name = 'PVLDB';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08379", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" on PVLDB after 2005 .", "sql": "SELECT t6.title FROM publication AS t6 JOIN journal AS t4 ON t6.jid = t4.jid JOIN writes AS t3 ON t3.pid = t6.pid JOIN writes AS t5 ON t5.pid = t6.pid JOIN author AS t1 ON t5.aid = t1.aid JOIN author AS t2 ON t3.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Yunyao Li' AND t4.name = 'PVLDB' AND t6.year > 2005;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08380", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have cooperated with \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08381", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" before 2000 .", "sql": "SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Divesh Srivastava' AND t5.year < 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08382", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have cited the papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t7 JOIN cite AS t5 ON t7.pid = t5.citing JOIN publication AS t6 ON t6.pid = t5.cited JOIN writes AS t3 ON t3.pid = t7.pid JOIN writes AS t4 ON t4.pid = t6.pid JOIN author AS t2 ON t3.aid = t2.aid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08383", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Divesh Srivastava';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08384", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" before 2000 .", "sql": "SELECT COUNT(DISTINCT t5.title) FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Divesh Srivastava' AND t5.year < 2000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08385", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of papers written by \" H. V. Jagadish \" , \" Yunyao Li \" , and \" Cong Yu \" .", "sql": "SELECT COUNT(DISTINCT t7.title) FROM writes AS t4 JOIN author AS t2 ON t4.aid = t2.aid JOIN publication AS t7 ON t4.pid = t7.pid JOIN writes AS t5 ON t5.pid = t7.pid JOIN writes AS t6 ON t6.pid = t7.pid JOIN author AS t1 ON t5.aid = t1.aid JOIN author AS t3 ON t6.aid = t3.aid WHERE t2.name = 'Cong Yu' AND t1.name = 'H. V. Jagadish' AND t3.name = 'Yunyao Li';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08386", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors who have cooperated with \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08387", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the number of authors who have cited the papers by \" H. V. Jagadish \" .", "sql": "SELECT COUNT(DISTINCT t2.name) FROM publication AS t7 JOIN cite AS t5 ON t7.pid = t5.citing JOIN publication AS t6 ON t6.pid = t5.cited JOIN writes AS t3 ON t3.pid = t7.pid JOIN writes AS t4 ON t4.pid = t6.pid JOIN author AS t2 ON t3.aid = t2.aid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = 'H. V. Jagadish';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08388", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" with more than 200 citations .", "sql": "SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'H. V. Jagadish' AND t1.name = 'Divesh Srivastava' AND t5.citation_num > 200;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08389", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author who has the most number of papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = 'Relational Database' GROUP BY t2.name ORDER BY COUNT(DISTINCT t3.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08390", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conference that has the most number of papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = 'Relational Database' GROUP BY t2.name ORDER BY COUNT(DISTINCT t3.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08391", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conference, which has the most number of papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = 'Relational Database' GROUP BY t2.name ORDER BY COUNT(DISTINCT t3.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08392", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journal that has the most number of papers containing keyword \" Relational Database \" .", "sql": "SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = 'Relational Database' GROUP BY t3.name ORDER BY COUNT(DISTINCT t2.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08393", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journal, which has the most number of papers containing keyword \" Relational Database \" .", "sql": "SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = 'Relational Database' GROUP BY t3.name ORDER BY COUNT(DISTINCT t2.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08394", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keyword, which have been contained by the most number of papers in VLDB conference .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB' GROUP BY t1.keyword ORDER BY COUNT(DISTINCT t3.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08395", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keyword, which have been contained by the most number of papers in PVLDB .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = 'PVLDB' GROUP BY t1.keyword ORDER BY COUNT(DISTINCT t2.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08396", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keyword, which have been contained by the most number of papers by \" H. V. Jagadish \" .", "sql": "SELECT t1.keyword FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' GROUP BY t1.keyword ORDER BY COUNT(DISTINCT t3.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08397", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author in the \" University of Michigan \" whose papers have the most total citations .", "sql": "SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan' GROUP BY t1.name ORDER BY SUM(t4.citation_num) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08398", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author in the \" University of Michigan \" whose papers in Databases area have the most total citations .", "sql": "SELECT t1.name FROM DOMAIN AS t4 JOIN domain_publication AS t2 ON t4.did = t2.did JOIN publication AS t5 ON t5.pid = t2.pid JOIN writes AS t3 ON t3.pid = t5.pid JOIN author AS t1 ON t3.aid = t1.aid JOIN organization AS t6 ON t6.oid = t1.oid WHERE t4.name = 'Databases' AND t6.name = 'University of Michigan' GROUP BY t1.name ORDER BY SUM(t5.citation_num) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08399", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" with the most number of citations .", "sql": "SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = 'Divesh Srivastava' AND t1.name = 'H. V. Jagadish' ORDER BY t5.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08400", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conferences, which have more than 10 papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' GROUP BY t2.name HAVING COUNT(DISTINCT t4.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08401", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conference, which have the most number of papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' GROUP BY t2.name ORDER BY COUNT(DISTINCT t4.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08402", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journals, which have more than 10 papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' GROUP BY t2.name HAVING COUNT(DISTINCT t4.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08403", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journal, which have the most number of papers by \" H. V. Jagadish \" .", "sql": "SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = 'H. V. Jagadish' GROUP BY t2.name ORDER BY COUNT(DISTINCT t4.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08404", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper with the most citations .", "sql": "SELECT title FROM publication ORDER BY citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08405", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in Databases area with the most citations .", "sql": "SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = 'Databases' ORDER BY t3.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08406", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in PVLDB with the most citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' ORDER BY t2.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08407", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper in VLDB conference with the most citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' ORDER BY t2.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08408", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper by \" H. V. Jagadish \" with the most citations .", "sql": "SELECT t3.title FROM writes AS t2 JOIN author AS t1 ON t2.aid = t1.aid JOIN publication AS t3 ON t2.pid = t3.pid WHERE t1.name = 'H. V. Jagadish' ORDER BY t3.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08409", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 with the most citations .", "sql": "SELECT title FROM publication WHERE YEAR > 2000 ORDER BY citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08410", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in Databases area with the most citations .", "sql": "SELECT t3.title FROM DOMAIN AS t2 JOIN domain_publication AS t1 ON t2.did = t1.did JOIN publication AS t3 ON t3.pid = t1.pid WHERE t2.name = 'Databases' AND t3.year > 2000 ORDER BY t3.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08411", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in PVLDB with the most citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = 'PVLDB' AND t2.year > 2000 ORDER BY t2.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08412", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the paper after 2000 in VLDB conference with the most citations .", "sql": "SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = 'VLDB' AND t2.year > 2000 ORDER BY t2.citation_num DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08413", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have more than 10 papers in PVLDB .", "sql": "SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB' GROUP BY t1.name HAVING COUNT(DISTINCT t4.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08414", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have the most number of papers in PVLDB .", "sql": "SELECT t1.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'PVLDB' GROUP BY t1.name ORDER BY COUNT(DISTINCT t4.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08415", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have more than 10 papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = 'Relational Database' GROUP BY t2.name HAVING COUNT(DISTINCT t3.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08416", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the conferences, which have more than 60 papers containing keyword \" Relational Database \" .", "sql": "SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = 'Relational Database' GROUP BY t2.name HAVING COUNT(DISTINCT t3.title) > 60;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08417", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the journals, which have more than 60 papers containing keyword \" Relational Database \" .", "sql": "SELECT t3.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t1.keyword = 'Relational Database' GROUP BY t3.name HAVING COUNT(DISTINCT t2.title) > 60;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08418", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords, which have been contained by more than 100 papers in VLDB conference .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t2.name = 'VLDB' GROUP BY t1.keyword HAVING COUNT(DISTINCT t3.title) > 100;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08419", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords, which have been contained by more than 100 papers in PVLDB .", "sql": "SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = 'PVLDB' GROUP BY t1.keyword HAVING COUNT(DISTINCT t2.title) > 100;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08420", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the keywords, which have been contained by more than 10 papers of \" H. V. Jagadish \" .", "sql": "SELECT t1.keyword FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t2.name = 'H. V. Jagadish' GROUP BY t1.keyword HAVING COUNT(DISTINCT t3.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08421", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the authors who have more than 10 papers in the VLDB conference .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB' GROUP BY t1.name HAVING COUNT(DISTINCT t4.title) > 10;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08422", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author who has the most number of papers in the VLDB conference .", "sql": "SELECT t1.name FROM publication AS t4 JOIN conference AS t2 ON t4.cid = t2.cid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t2.name = 'VLDB' GROUP BY t1.name ORDER BY COUNT(DISTINCT t4.title) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08423", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author in the \" University of Michigan \" whose papers have more than 5000 total citations .", "sql": "SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = 'University of Michigan' GROUP BY t1.name HAVING SUM(t4.citation_num) > 5000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08424", "db_id": "academic", "schema_text": "CREATE TABLE author (aid BIGINT, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE cite (cited BIGINT, citing BIGINT);\nCREATE TABLE conference (cid BIGINT, homepage VARCHAR, name VARCHAR);\nCREATE TABLE domain (did BIGINT, name VARCHAR);\nCREATE TABLE domain_author (aid BIGINT, did BIGINT);\nCREATE TABLE domain_conference (cid BIGINT, did BIGINT);\nCREATE TABLE domain_journal (did BIGINT, jid BIGINT);\nCREATE TABLE domain_keyword (did BIGINT, kid BIGINT);\nCREATE TABLE domain_publication (did BIGINT, pid BIGINT);\nCREATE TABLE journal (homepage VARCHAR, jid BIGINT, name VARCHAR);\nCREATE TABLE keyword (keyword VARCHAR, kid BIGINT);\nCREATE TABLE organization (continent VARCHAR, homepage VARCHAR, name VARCHAR, oid BIGINT);\nCREATE TABLE publication (abstract VARCHAR, cid VARCHAR, citation_num BIGINT, jid BIGINT, pid BIGINT, reference_num BIGINT, title VARCHAR, year BIGINT);\nCREATE TABLE publication_keyword (pid BIGINT, kid BIGINT);\nCREATE TABLE writes (aid BIGINT, pid BIGINT);", "question": "return me the author in the \" University of Michigan \" in Databases area whose papers have more than 5000 total citations .", "sql": "SELECT t1.name FROM domain_author AS t6 JOIN author AS t1 ON t6.aid = t1.aid JOIN DOMAIN AS t3 ON t3.did = t6.did JOIN organization AS t5 ON t5.oid = t1.oid JOIN writes AS t2 ON t2.aid = t1.aid JOIN publication AS t4 ON t2.pid = t4.pid WHERE t3.name = 'Databases' AND t5.name = 'University of Michigan' GROUP BY t1.name HAVING SUM(t4.citation_num) > 5000;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08425", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What year is the movie \" The Imitation Game \" from ?", "sql": "SELECT release_year FROM movie WHERE title = 'The Imitation Game';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08426", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What year was the movie \" The Imitation Game \" produced", "sql": "SELECT release_year FROM movie WHERE title = 'The Imitation Game';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08427", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What year was \" Benedict Cumberbatch \" born ?", "sql": "SELECT birth_year FROM actor WHERE name = 'Benedict Cumberbatch';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08428", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "In what year was \" Benedict Cumberbatch \" born", "sql": "SELECT birth_year FROM actor WHERE name = 'Benedict Cumberbatch';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08429", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the nationality of the actress \" Christoph Waltz \" ?", "sql": "SELECT nationality FROM actor WHERE name = 'Christoph Waltz';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08430", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the nationality of the actor \" Christoph Waltz \" ?", "sql": "SELECT nationality FROM actor WHERE name = 'Christoph Waltz';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08431", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies produced in 2015", "sql": "SELECT title FROM movie WHERE release_year = 2015;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08432", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors born in \" Tehran \"", "sql": "SELECT name FROM actor WHERE birth_city = 'Tehran';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08434", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Which actors were born in Tehran", "sql": "SELECT name FROM actor WHERE birth_city = 'Tehran';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08435", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors who are from Afghanistan", "sql": "SELECT name FROM actor WHERE nationality = 'Afghanistan';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08436", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors from Afghanistan", "sql": "SELECT name FROM actor WHERE nationality = 'Afghanistan';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08437", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Give me the name of all the actors from Afghanistan", "sql": "SELECT name FROM actor WHERE nationality = 'Afghanistan';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08438", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors who were born in 1984", "sql": "SELECT name FROM actor WHERE birth_year = 1984;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08439", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "When was \" Kevin Spacey \" born ?", "sql": "SELECT birth_year FROM actor WHERE name = 'actor_name0';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08440", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "In what year was \" Kevin Spacey \" born ?", "sql": "SELECT birth_year FROM actor WHERE name = 'actor_name0';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08441", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Where is the birth place of \" Kevin Spacey \"", "sql": "SELECT birth_city FROM director WHERE name = 'director_name0';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08442", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "In what city was \" Kevin Spacey \" born ?", "sql": "SELECT birth_city FROM director WHERE name = 'director_name0';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08443", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the nationality of \" Kevin Spacey \" ?", "sql": "SELECT nationality FROM director WHERE name = 'director_name0';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08444", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How much was the budget of \" Finding Nemo \"", "sql": "SELECT budget FROM movie WHERE title = 'Finding Nemo';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08445", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies directed by \" Steven Spielberg \" after 2006", "sql": "SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Steven Spielberg' AND t3.release_year > 2006;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08446", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who is the director of the movie \" James Bond \" ?", "sql": "SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'James Bond';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08447", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who directed the movie \" James Bond \" ?", "sql": "SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'James Bond';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08448", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "List \" James Bond \" directors", "sql": "SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'James Bond';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08449", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the actor who played \" Alan Turing \" in the movie \" The Imitation Game \"", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = 'Alan Turing' AND t3.title = 'The Imitation Game';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08450", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who acted \" Alan Turing \" in the movie \" The Imitation Game \" ?", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = 'Alan Turing' AND t3.title = 'The Imitation Game';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08451", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who was the actor that played \" Alan Turing \" in the movie \" The Imitation Game \" ?", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = 'Alan Turing' AND t3.title = 'The Imitation Game';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08452", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who acts as \" Alan Turing \" in the movie \" The Imitation Game \" ?", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = 'Alan Turing' AND t3.title = 'The Imitation Game';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08453", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who is the actor playing \" Alan Turing \" in \" The Imitation Game \" ?", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = 'Alan Turing' AND t3.title = 'The Imitation Game';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08454", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the genre of the movie \" Jurassic Park \" ?", "sql": "SELECT t2.genre FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'Jurassic Park';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08455", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who was the director of the movie Joy from 2015 ?", "sql": "SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.release_year = 2015 AND t3.title = 'Joy';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08456", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies written by \" Matt Damon \"", "sql": "SELECT t1.title FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t2.name = 'Matt Damon';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08457", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies written and produced by \" Woody Allen \"", "sql": "SELECT t2.title FROM movie AS t2 JOIN made_by AS t3 ON t2.mid = t3.msid JOIN producer AS t1 ON t1.pid = t3.pid JOIN written_by AS t5 ON t5.msid = t2.mid JOIN writer AS t4 ON t5.wid = t4.wid WHERE t1.name = 'Woody Allen' AND t4.name = 'Woody Allen';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08458", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies featuring \" Robin Wright \"", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Robin Wright';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08459", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are all the movies featuring \" Robin Wright \" ?", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Robin Wright';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08460", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies in which \" Robin Wright \" appears", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Robin Wright';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08461", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What was the budget of the movie Juno from 2007 ?", "sql": "SELECT budget FROM movie WHERE release_year = 2007 AND title = 'Juno';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08462", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all Sci-Fi produced in year 2010", "sql": "SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.genre = 'Sci-Fi' AND t3.release_year = 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08463", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "List all the Sci-Fi movies which released in 2010", "sql": "SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.genre = 'Sci-Fi' AND t3.release_year = 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08464", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors born in \" Austin \" after 1980", "sql": "SELECT name FROM actor WHERE birth_city = 'Austin' AND birth_year > 1980;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08465", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who are the actors born in \" Austin \" after 1980 ?", "sql": "SELECT name FROM actor WHERE birth_city = 'Austin' AND birth_year > 1980;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08466", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors from Austin born after 1980", "sql": "SELECT name FROM actor WHERE birth_city = 'Austin' AND birth_year > 1980;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08467", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies by directors born in \" Los Angeles \"", "sql": "SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.birth_city = 'Los Angeles';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08468", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors who were born in \" New York City \" in 1984", "sql": "SELECT name FROM actor WHERE birth_city = 'New York City' AND birth_year = 1984;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08469", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies about nuclear weapons", "sql": "SELECT t3.title FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = 'nuclear weapons';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08470", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are the movies related to nuclear weapons", "sql": "SELECT t3.title FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = 'nuclear weapons';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08471", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Which movies did \" Alfred Hitchcock \" direct ?", "sql": "SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Alfred Hitchcock';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08472", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies directed by \" Asghar Farhadi \" and featuring \" Taraneh Alidoosti \"", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = 'Taraneh Alidoosti' AND t3.name = 'Asghar Farhadi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08473", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are all the movies directed by \" Asghar Farhadi \" featuring \" Taraneh Alidoosti \" ?", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = 'Taraneh Alidoosti' AND t3.name = 'Asghar Farhadi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08474", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies are there that are directed by \" Asghar Farhadi \" and featuring \" Taraneh Alidoosti \" ?", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = 'Taraneh Alidoosti' AND t3.name = 'Asghar Farhadi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08475", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "List all the movies directed by \" Asghar Farhadi \" in which \" Taraneh Alidoosti \" played", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = 'Taraneh Alidoosti' AND t3.name = 'Asghar Farhadi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08476", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are all the tv series created by \" Shonda Rhimes \" ?", "sql": "SELECT t2.title FROM producer AS t1 JOIN made_by AS t3 ON t1.pid = t3.pid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = 'Shonda Rhimes';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08477", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who acts \" Olivia Pope \" in the series Scandal ?", "sql": "SELECT t1.name FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t3.role = 'Olivia Pope' AND t2.title = 'Scandal';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08478", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who is the writer of the movie \" The Truman Show \"", "sql": "SELECT t2.name FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t1.title = 'The Truman Show';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08479", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who is the writer of \" The Truman Show \"", "sql": "SELECT t2.name FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t1.title = 'The Truman Show';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08480", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are the series featuring \" Scott Foley \" ?", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = 'Scott Foley';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08481", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are the series in which \" Scott Foley \" is an actor ?", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN tv_series AS t2 ON t2.sid = t3.msid WHERE t1.name = 'Scott Foley';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08482", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the directors of all movies featuring \" Kate Winslet \"", "sql": "SELECT t3.name FROM \"CAST\" AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = 'Kate Winslet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08483", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the producers of all movies in which \" Kate Winslet \" is an actor", "sql": "SELECT t1.name FROM \"CAST\" AS t3 JOIN actor AS t2 ON t3.aid = t2.aid JOIN movie AS t5 ON t5.mid = t3.msid JOIN made_by AS t4 ON t5.mid = t4.msid JOIN producer AS t1 ON t1.pid = t4.pid WHERE t2.name = 'Kate Winslet';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08484", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Who is the director of the tv series \" House of Cards \" from 2013 ?", "sql": "SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN tv_series AS t3 ON t3.sid = t1.msid WHERE t3.release_year = 2013 AND t3.title = 'House of Cards';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08485", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all the female actors from Austin", "sql": "SELECT name FROM actor WHERE birth_city = 'Austin' AND gender = 'female';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08486", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors from Italy born after 1980", "sql": "SELECT name FROM actor WHERE birth_year > 1980 AND nationality = 'Italy';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08487", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all the female actors born in \" New York City \" after 1980", "sql": "SELECT name FROM actor WHERE birth_city = 'New York City' AND birth_year > 1980 AND gender = 'female';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08488", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all the female actors in the movie \" Saving Private Ryan \"", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.gender = 'female' AND t3.title = 'Saving Private Ryan';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08489", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all the directors who are from Afghanistan", "sql": "SELECT name FROM director WHERE nationality = 'Afghanistan';", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08490", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the actors who played in the movie \" Camp X-Ray \"", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = 'Camp X-Ray';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08491", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors from Canada who acted in \" James Bond \" movies", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = 'Canada' AND t3.title = 'James Bond';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08492", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "find all films in which \" Rowan Atkinson \" acted as \" Mr. Bean \"", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Rowan Atkinson' AND t3.role = 'Mr. Bean';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08493", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "where is the director of \" The Past \" from", "sql": "SELECT t2.birth_city FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = 'The Past';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08494", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "who acted the role of \" Mr. Bean \"", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid WHERE t2.role = 'Mr. Bean';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08495", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "what are the genres of movies directed by \" Asghar Farhadi \"", "sql": "SELECT t3.genre FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN classification AS t1 ON t4.mid = t1.msid JOIN genre AS t3 ON t3.gid = t1.gid WHERE t5.name = 'Asghar Farhadi';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08496", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Which movie had the character \" Daffy Duck \"", "sql": "SELECT t1.title FROM movie AS t1 JOIN \"CAST\" AS t2 ON t1.mid = t2.msid WHERE t2.role = 'Daffy Duck';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08497", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What are the major roles in the movie \" Daddy Long Legs \"", "sql": "SELECT t2.role FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = 'Daddy Long Legs';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08498", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "List all the directors of movies about nuclear weapons", "sql": "SELECT t3.name FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN tags AS t5 ON t5.msid = t4.mid JOIN keyword AS t1 ON t5.kid = t1.id WHERE t1.keyword = 'nuclear weapons';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08499", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies in which \" Jennifer Aniston \" acted after 2010 ?", "sql": "SELECT COUNT(DISTINCT t2.title) FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Jennifer Aniston' AND t2.release_year > 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08500", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of actors in the movie \" Saving Private Ryan \" ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = 'Saving Private Ryan';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08501", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many actors are in the movie \" Saving Private Ryan \" ?", "sql": "SELECT COUNT(DISTINCT t1.name) FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t3.title = 'Saving Private Ryan';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08502", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Steven Spielberg \" direct ?", "sql": "SELECT COUNT(DISTINCT t3.title) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Steven Spielberg';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08503", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies were produced in the year 2013 ?", "sql": "SELECT COUNT(DISTINCT title) FROM movie WHERE release_year = 2013;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08504", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies produced in 2013 ?", "sql": "SELECT COUNT(DISTINCT title) FROM movie WHERE release_year = 2013;", "source": "spider_others", "difficulty": "easy"} -{"id": "spider_train_08505", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies directed by \" Woody Allen \" per year ?", "sql": "SELECT COUNT(DISTINCT t3.title), t3.release_year FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Woody Allen' GROUP BY t3.release_year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08506", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Shahab Hosseini \" act in ?", "sql": "SELECT COUNT(DISTINCT t2.title) FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Shahab Hosseini';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08507", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies in which \" Shahab Hosseini \" acted ?", "sql": "SELECT COUNT(DISTINCT t2.title) FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Shahab Hosseini';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08508", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies featuring \" Shahab Hosseini \" ?", "sql": "SELECT COUNT(DISTINCT t2.title) FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Shahab Hosseini';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08510", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many actors were born in \" Los Angeles \" after 2000 ?", "sql": "SELECT COUNT(DISTINCT name) FROM actor WHERE birth_city = 'Los Angeles' AND birth_year > 2000;", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08511", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Humphrey Bogart \" act in before 1942 ?", "sql": "SELECT COUNT(DISTINCT t2.title) FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Humphrey Bogart' AND t2.release_year < 1942;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08512", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the number of movies that \" Brad Pitt \" acts in per year ?", "sql": "SELECT COUNT(DISTINCT t2.title), t2.release_year FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = 'Brad Pitt' GROUP BY t2.release_year;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08513", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies about Iraq war were produced in 2015 ?", "sql": "SELECT COUNT(DISTINCT t3.title) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = 'Iraq war' AND t3.release_year = 2015;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08514", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies about Persians were released after 1990 ?", "sql": "SELECT COUNT(DISTINCT t3.title) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = 'Persians' AND t3.release_year > 1990;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08515", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Quentin Tarantino \" direct after 2010 ?", "sql": "SELECT COUNT(DISTINCT t3.title) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Quentin Tarantino' AND t3.release_year > 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08516", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Quentin Tarantino \" direct before 2010 ?", "sql": "SELECT COUNT(DISTINCT t3.title) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Quentin Tarantino' AND t3.release_year < 2010;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08517", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many movies did \" Quentin Tarantino \" direct before 2002 and after 2010 ?", "sql": "SELECT COUNT(DISTINCT t4.title) FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid WHERE t3.name = 'Quentin Tarantino' AND t4.release_year < 2010 AND t4.release_year > 2002;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08518", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many female actors were born in \" New York City \" after 1980 ?", "sql": "SELECT COUNT(DISTINCT name) FROM actor WHERE birth_city = 'New York City' AND birth_year > 1980 AND gender = 'female';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08519", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "find the number of actors from Iran who played in \" Jim Jarmusch \" movies", "sql": "SELECT COUNT(DISTINCT t1.name) FROM \"CAST\" AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.nationality = 'Iran' AND t3.name = 'Jim Jarmusch';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08520", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "How many actors from China have acted in \" Rush Hour 3 \"", "sql": "SELECT COUNT(DISTINCT t1.name) FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = 'China' AND t3.title = 'Rush Hour 3';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08521", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies that star both \" Woody Strode \" and \" Jason Robards \"", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN \"CAST\" AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = 'Woody Strode' AND t2.name = 'Jason Robards';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08522", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies featuring \" Woody Strode \" and \" Jason Robards \"", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN \"CAST\" AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = 'Woody Strode' AND t2.name = 'Jason Robards';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08523", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies featuring both \" Woody Strode \" and \" Jason Robards \"", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN \"CAST\" AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = 'Woody Strode' AND t2.name = 'Jason Robards';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08524", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all movies featuring \" Jason Robards \" and \" Woody Strode \"", "sql": "SELECT t4.title FROM \"CAST\" AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN \"CAST\" AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = 'Woody Strode' AND t2.name = 'Jason Robards';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08525", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find all actors who acted in the same movie as \" Tom Hanks \"", "sql": "SELECT t1.name FROM \"CAST\" AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN \"CAST\" AS t3 ON t5.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t2.name = 'Tom Hanks';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08526", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What movies have the same director as the movie \" Revolutionary Road \" ?", "sql": "SELECT t3.title FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN directed_by AS t1 ON t5.did = t1.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t4.title = 'Revolutionary Road';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08527", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the movie which is classified in the most number of genres", "sql": "SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid GROUP BY t3.title ORDER BY COUNT(DISTINCT t2.genre) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08528", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "which movie has the most number of actors from China ?", "sql": "SELECT t2.title FROM \"CAST\" AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.nationality = 'China' GROUP BY t2.title ORDER BY COUNT(DISTINCT t1.name) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08529", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the actors who played in the latest movie by \" Quentin Tarantino \"", "sql": "SELECT t1.name FROM \"CAST\" AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t3.name = 'Quentin Tarantino' ORDER BY t5.release_year DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08530", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the name and budget of the latest movie by \" Quentin Tarantino \"", "sql": "SELECT t3.budget, t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Quentin Tarantino' ORDER BY t3.release_year DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08531", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "What is the latest movie by \" Jim Jarmusch \"", "sql": "SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = 'Jim Jarmusch' ORDER BY t3.release_year DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08532", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Which producer has worked with the most number of directors ?", "sql": "SELECT t1.name FROM director AS t3 JOIN directed_by AS t2 ON t3.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN made_by AS t5 ON t4.mid = t5.msid JOIN producer AS t1 ON t1.pid = t5.pid GROUP BY t1.name ORDER BY COUNT(DISTINCT t3.name) DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08533", "db_id": "imdb", "schema_text": "CREATE TABLE actor (aid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE \"cast\" (id BIGINT, msid BIGINT, aid BIGINT, role BIGINT);\nCREATE TABLE classification (id BIGINT, msid BIGINT, gid BIGINT);\nCREATE TABLE company (id BIGINT, name VARCHAR, country_code VARCHAR);\nCREATE TABLE copyright (id BIGINT, msid BIGINT, cid BIGINT);\nCREATE TABLE directed_by (id BIGINT, msid BIGINT, did BIGINT);\nCREATE TABLE director (did BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE genre (gid BIGINT, genre VARCHAR);\nCREATE TABLE keyword (id BIGINT, keyword VARCHAR);\nCREATE TABLE made_by (id BIGINT, msid BIGINT, pid BIGINT);\nCREATE TABLE movie (mid BIGINT, title VARCHAR, release_year BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE producer (pid BIGINT, gender VARCHAR, name VARCHAR, nationality VARCHAR, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE tags (id BIGINT, msid BIGINT, kid BIGINT);\nCREATE TABLE tv_series (sid BIGINT, title VARCHAR, release_year BIGINT, num_of_seasons BIGINT, num_of_episodes BIGINT, title_aka VARCHAR, budget VARCHAR);\nCREATE TABLE writer (wid BIGINT, gender VARCHAR, name BIGINT, nationality BIGINT, num_of_episodes BIGINT, birth_city VARCHAR, birth_year BIGINT);\nCREATE TABLE written_by (id BIGINT, msid BIGINT, wid BIGINT);", "question": "Find the latest movie which \" Gabriele Ferzetti \" acted in", "sql": "SELECT t1.name FROM \"CAST\" AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.name = 'Gabriele Ferzetti' ORDER BY t3.release_year DESC LIMIT 1;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08534", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many buttercup kitchen are there in san francisco ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.name = 'buttercup kitchen';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08535", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many chinese restaurants are there in the bay area ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'chinese';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08536", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many places for chinese food are there in the bay area ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'chinese';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08537", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many chinese places are there in the bay area ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'chinese';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08538", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many places for chinese are there in the bay area ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'chinese';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08539", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many jamerican cuisine are there in santa cruz county ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.county = 'santa cruz county' AND t1.name = 'jamerican cuisine';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08540", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is jamerican cuisine ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.name = 'jamerican cuisine';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08541", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is the best french restaurant in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08542", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "What is the best french in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08543", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "What is the best place in san francisco for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08544", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Give me the best place in san francisco for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08545", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Where is the best french in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08546", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Give me the best french in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08547", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Where is the best french restaurant in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08548", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Give me the best restaurant in san francisco for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08549", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Give me the best french restaurant in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08550", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "What is the best restaurant in san francisco for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08551", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "Where is the best restaurant in san francisco for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.food_type = 'french');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08552", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is denny in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.name = 'denny';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08553", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good restaurants on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08554", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good restaurants on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08555", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08556", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is a good restaurant on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08557", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can we find a restaurant in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08558", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a restaurant in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08559", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can we find some restaurants in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08560", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a restaurant in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08561", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08562", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants good for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08563", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some restaurants good for french food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08564", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many places for french food are there in palo alto ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'palo alto' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08565", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many french restaurants are there in palo alto ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'palo alto' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08566", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many french restaurant are there in palo alto ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'palo alto' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08567", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many places for french are there in palo alto ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'palo alto' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08568", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many italian restaurants are in the yolo county ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.county = 'yolo county' AND t1.food_type = 'italian';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08569", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat french food in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08570", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "how many denny are there in the bay area ?", "sql": "SELECT COUNT(*) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.name = 'denny';", "source": "spider_others", "difficulty": "medium"} -{"id": "spider_train_08571", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08572", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good restaurants in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08573", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is a good restaurant in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08574", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good restaurants in alameda ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'alameda' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08575", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good restaurant on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08576", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some good arabics on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08577", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good arabic restaurant on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08578", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good places for arabic on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08579", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good arabic on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08580", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants good for arabic food on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08581", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good place on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08582", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good place on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08583", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat arabic food on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08584", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good places on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08585", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a arabic restaurant on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08586", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a restaurant on buchanan in san francisco that serves good arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08587", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08588", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a restaurant on buchanan in san francisco that serves good arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08589", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good restaurants on buchanan in san francisco for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08590", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good places for arabic on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08591", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat some good arabic food on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08592", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good arabic on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08593", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some restaurants good for arabic food on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08594", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some good places for arabic on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08595", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good arabic restaurant on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08596", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good arabics on buchanan in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t2.street_name = 'buchanan' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08597", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat french food in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'french';", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08598", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08599", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a restaurant on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08600", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can we find a restaurant on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08601", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can we find some restaurants on bethel island rd in bethel island ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'bethel island' AND t2.street_name = 'bethel island rd';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08602", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is the best restaurant in the bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08603", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is the best restaurant in bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08604", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is the best restaurant in bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08605", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is the best american restaurant in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08606", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is the best american restaurant in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08607", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is the best american in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08608", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me the best restaurant in the bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08609", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me the best restaurant in bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08610", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is the best restaurant in the bay area for american food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08611", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is the best american in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08612", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me the best american in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08613", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me the best american restaurant in the bay area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'bay area' AND t1.food_type = 'american' AND t1.rating = (SELECT MAX(t1.rating) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = 'bay area' AND t1.food_type = 'american');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08614", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants good for french food in the yosemite and mono lake area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08615", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good places in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08616", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08617", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good french restaurant in the yosemite and mono lake area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08618", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good place in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08619", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some restaurants good for french food in the yosemite and mono lake area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08620", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good place in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08621", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good restaurant in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08622", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good restaurants in the yosemite and mono lake area for french food ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08623", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good french restaurant in the yosemite and mono lake area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08624", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat some good french food in the yosemite and mono lake area ?", "sql": "SELECT t3.house_number, t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = 'yosemite and mono lake area' AND t1.food_type = 'french' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "hard"} -{"id": "spider_train_08625", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some restaurants good for arabic food in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08626", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good places in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08627", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some good arabic restaurants in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08628", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "show me a good arabic restaurant in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08629", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good arabic in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08630", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good arabic restaurant in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08631", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good place in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08632", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some good arabics in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08633", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a restaurant in mountain view that serves good arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08634", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good restaurants in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08635", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants good for arabic food in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08636", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i eat some good arabic food in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08637", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good places for arabic in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08638", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good arabic in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08639", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a restaurant in mountain view that serves good arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08640", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good arabic restaurants in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08641", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where are some good places for arabic in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08642", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good arabics in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08643", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08644", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good arabic restaurant in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08645", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good places for arabic in mountain view ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08646", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good restaurant in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08647", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a good place in mountain view for arabic food ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'mountain view' AND t1.food_type = 'arabic' AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08648", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i find a jamerican cuisine in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.name = 'jamerican cuisine';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08649", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is jamerican cuisine in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.name = 'jamerican cuisine';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08650", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where is a jamerican cuisine in san francisco ?", "sql": "SELECT t2.house_number, t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = 'san francisco' AND t1.name = 'jamerican cuisine';", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08651", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can we find some restaurants in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'bay area');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08652", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some restaurants in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'bay area');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08653", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a restaurant in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'bay area');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08654", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "where can i find a restaurant in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'bay area');", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08655", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me a good restaurant in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'region0') AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08656", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what are some good restaurants in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'region0') AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08657", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "give me some good restaurants in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'region0') AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} -{"id": "spider_train_08658", "db_id": "restaurants", "schema_text": "CREATE TABLE GEOGRAPHIC (CITY_NAME VARCHAR, COUNTY VARCHAR, REGION VARCHAR);\nCREATE TABLE LOCATION (RESTAURANT_ID BIGINT, HOUSE_NUMBER BIGINT, STREET_NAME VARCHAR, CITY_NAME VARCHAR);\nCREATE TABLE RESTAURANT (ID BIGINT, NAME VARCHAR, FOOD_TYPE VARCHAR, CITY_NAME VARCHAR, RATING DOUBLE);", "question": "what is a good restaurant in the bay area ?", "sql": "SELECT t2.house_number, t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN (SELECT city_name FROM geographic WHERE region = 'region0') AND t1.rating > 2.5;", "source": "spider_others", "difficulty": "extra"} +version https://git-lfs.github.com/spec/v1 +oid sha256:1674223a8709ea3c4b17bc40d48cdf4ab6c0b695e76ac06c8f23a8dbf917c143 +size 10919972